Accelerometer movement
FanStudioUK
Member Posts: 459
Hi guys,
In my game I'm using this method to make my character move through the scene with the accelerometer:
Constrain: Self.Motion.Linear.Velocity.X - 500*(-game.Accelerometer.Y) (My game is in Landscape mode)
I have one problem, if I play the game, landscape mode with my home button on my right hand side everything runs ok, BUT if I flip the screen and I have the home button on my left hand side my player's movement is backwards!
Is there any way to find which way the iPhone is held so everything will run ok both sides?
Thank you
In my game I'm using this method to make my character move through the scene with the accelerometer:
Constrain: Self.Motion.Linear.Velocity.X - 500*(-game.Accelerometer.Y) (My game is in Landscape mode)
I have one problem, if I play the game, landscape mode with my home button on my right hand side everything runs ok, BUT if I flip the screen and I have the home button on my left hand side my player's movement is backwards!
Is there any way to find which way the iPhone is held so everything will run ok both sides?
Thank you
Comments
rule - when game.screen.deviceOrientation is landscape left
accelerometer rules
OTHERWISE
accelerometer rules backwords