When I build my app and install onto my phone, the tilt=based gravity does not work. I am trying to use it to roll a ball left and right, but it just starts floating all over the place, whichever way I tilt it. I have the orientation set to landscape, and this is the code:
local function onTilt( event )
physics.setGravity( 10 * event.xGravity, -10 * event.yGravity )
end
Runtime:addEventListener( “accelerometer”, onTilt ) [import]uid: 116264 topic_id: 20430 reply_id: 320430[/import]
[import]uid: 52491 topic_id: 20430 reply_id: 80042[/import]