Left and Right with accelerometer

Gamer61Gamer61 Member Posts: 40
edited January 2012 in Working with GS (Mac)
I have an actor that suppose to move when the device is tilted just not up and done how can i make an actor go right and left with the accelerometer?

Comments

  • App SurgeApp Surge Member Posts: 651
    In the actor you want to move left and right, use something like this:
    constrain attribute self.position.x to game.accelerometer.x*600
    You can replace the 600 with a different number to adjust the speed.
  • Gamer61Gamer61 Member Posts: 40
    Perfect thanks!
  • App SurgeApp Surge Member Posts: 651
    Anytime man! Glad I could help.
Sign In or Register to comment.