Issue with physics.setGravity()

I’m messing around with a little idea however I’m having an issue with the gravity.

Pressing any of the 4 directional arrows will switch the gravity to that direction, this all works fine apart from when the block is stationary, i.e. it has already fully landed and completely stopped bouncing. As you will see from the output the gravity values do change yet the block isn’t effected.

I have uploaded a simple demo showing off this problem here - http://dl.dropbox.com/u/571145/gravity.zip [import]uid: 5833 topic_id: 9959 reply_id: 309959[/import]

I just tested your code. If you make the following change you should be fine:

physics.start( true )  

This prevents the physics from going to sleep mode

Source:
http://developer.anscamobile.com/content/game-edition-box2d-physics-engine#physics.start_noSleep_
[import]uid: 31262 topic_id: 9959 reply_id: 36309[/import]

Perfect, thank you very much! [import]uid: 5833 topic_id: 9959 reply_id: 36310[/import]