ive tried so many code snippets and none of them are working… i have also tried the sample code called shapeTumbler but that doesnt seem to works to good for me… i want it to no really on phyics… i have this code that make the box go side to side but not move around fully on the screen…
local function onAccelerate( event ) if box.x \> display.contentWidth \* 0.1 and box.x \< display.contentWidth \* 0.9 then box.x = box.x + (event.xInstant) \* 100 end if box.x \> display.contentWidth \* 1 then box.x = display.contentWidth \* 0.97 end if box.x \< display.contentWidth \* 0 then box.x = display.contentWidth \* 0.03 end end Runtime:addEventListener( "accelerometer", onAccelerate )