Gravity Change

Hello,

I want to make my game horizontal, i know how to change the simulator to be vertical and horizontally but the gravity stays the same. Is there a way to change the gravity because the gravity stays to when the simulator is vertical? I tried changing the gravity but it did not work the same.

Thank you. [import]uid: 23689 topic_id: 10232 reply_id: 310232[/import]

Ok so lets say your gravity is originality set like this.

[lua] physics.setGravity( 0 , 9.8) [/lua]

Then you would make an if statement saying if the phone is tilted. In that if statement you would
set the gravity to some other variable. Something similar to this.
[lua] physics.setGravity( 9.8, 0) [/lua]

Since you would want gravity to be going on the X axis, changing the X variable should work. You may need to make the variable to a negative depending upon direction.

Hope this helps.

Regards,
Jordan Schuetz
Ninja Pig Studios [import]uid: 29181 topic_id: 10232 reply_id: 37341[/import]