Moving a character left and right using accelerometer

Hi, I'm making a maze game for iPhone and I currently have a character which the user controls by tilting the phone left and right. This works but I need the character to respond faster to the tilt of the phone. At the moment if you tilt the phone left and let it slide, and then suddenly tilt the phone right, it takes a while for the actor to slow down/come to a stop and then respond to the tilt to move in the opposite direction.

Anybody know how I can make the character respond instantaneously? At the moment I have everything in the physics of the character actor set to 0, with fixed rotation and moveable checked.

Thankyou

Comments

  • ArmellineArmelline Member, PRO Posts: 5,371
    In my brief testing, my actor changes direction instantly. What behaviours are you using to move your actor?
  • hayleyd11hayleyd11 Member Posts: 6
    I have a rule that says when the orientation of the phone is landscape left:

    When Attribute game.accelerometer.Y > 0.1

    Then Accelerate Direction 180, Acceleration 60 Relative to scene.

    Then i've copied this rule and changed the values for making the character move in the opposite direction so instead of 0.1 it'd be -0.1 etc.


    Should I be using accelerate or something else?

    Thanks for your help!
  • hayleyd11hayleyd11 Member Posts: 6
    I've figured it out :) I had acceleration set to 60. Instead I changed acceleration to 2000 and set max speed to 60 and now it reacts exactly how I want it to!
Sign In or Register to comment.