actor movement more smooth on iphone?
Jaxter
Member, PRO Posts: 398
Finally with game salad wiever my game is on phone, looks great, but i dont like control ( work of accelometer ) . actor moving up down left and right speed was 200 on web br is was great and dinamic but on phone is stucking in moments is bad.. so i incase speed to around 120 .. but it is too slow .. is possible to make actr movments more fluid and smooth whan changing from up to down and left to right ?
Comments
Could you apply a drag behaviour for smoothness, and put the movement value somewhere in between the 2 you already have (120 and 200)?
So for up/down its using game.accelerometer.X for data. When the value is negative, it goes up, and when positive, it goes down.
If you use the Move behavior you can have the speed be
min(120, -200*game.accelerometer.X) direction 90 degrees relative to scene.
That way the more you tilt in either direction, the faster it goes but with a limit on the max speed.
So my controls looks like there, what i must add here? move to function?
is all there is right: http://www.raganasligzda.lv/citi/movex.png
and the min(100, accelerometer*200) is 0.
just for testing, make an actor that display texts the game.accelerometer.X value. Then you can see how big (or small) the values you can get with that device attribute.
If I set the first number in the equation to 0 it will not work when testing with keyboard, but should work when testing on iphone with gsviewer? Would this be "smoother" than setting the first number to say 100?