accelerometer help

zombotszombots Member Posts: 186
edited November -1 in Working with GS (Mac)
does any one know how i can make an actor move faster the more the phone is tilited?

Comments

  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    multiply the accelerometer value by some constant.
  • AtlantenAtlanten Member, PRO Posts: 56
    Try constraining the linear velocity to the accelerometer value.

    Constrain attribute: (self.Motion.Linear Velocity.X) = (game.Accelerometer.Y)*500

    The accelerometer outputs a very small number. That's why it's multiplied by 500 here. Change 500 to whatever suits you.
  • zombotszombots Member Posts: 186
    awesome that works, thanks heaps both of you:)
Sign In or Register to comment.