actor movement more smooth on iphone?

JaxterJaxter Member, PRO Posts: 398
edited November -1 in Working with GS (Mac)
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

  • ratbumratbum Member Posts: 18
    I don't consider myself an expert in any sense of the word, and I certainly have no idea if this is what you're looking for, but:

    Could you apply a drag behaviour for smoothness, and put the movement value somewhere in between the 2 you already have (120 and 200)?
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    Or try using the data from the accelerometer as part of the speed.

    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.
  • JaxterJaxter Member, PRO Posts: 398
    http://raganasligzda.lv/citi/updown.png

    So my controls looks like there, what i must add here? move to function?
  • JaxterJaxter Member, PRO Posts: 398
    Hmm i made like you said to test for moving my actor up.. but now in game moden no more working keyboard , and in phone it moves with speed 100 but not going faster in end..

    is all there is right: http://www.raganasligzda.lv/citi/movex.png
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    it won't work with the keyboard using the accelerometer because the accelerometer is always 0.

    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.
  • JaxterJaxter Member, PRO Posts: 398
    can you sow in screenshoot it.. pleas.. right way
  • JaxterJaxter Member, PRO Posts: 398
    pleas..
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Am I understanding this right?

    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?
Sign In or Register to comment.