Hi.
I am in the process of converting an app in Objective C to Corona.
I am working on something where I would like a sliding png image to move to either the left or the right when you tilt the device.
I made the image a body, and it moves if you drag it with your finger, but I want it to also move when you tilt the device.
Thanks for your input.
(by the way,
I modified some code off the reference and Im not sure if this could be a good start
local function onTilt( event )
physics.setGravity( 10 * event.xGravity, 1* event.yGravity )
end
Runtime:addEventListener( “accelerometer”, onTilt )
end
) [import]uid: 8054 topic_id: 1770 reply_id: 301770[/import]