So i have this code and it lets me move the object side to side on tilt on the X axis… but its glitchy like it moves but it has a distinctive glitchyness to it… how do i fix it?
local function onAccelerate( event ) if Player.x \> display.contentWidth \* -0.2 and Player.x \< display.contentWidth \* 1.2 then Player.x = Player.x + (event.xInstant) \* 200 end if Player.x \> display.contentWidth \* 1 then Player.x = display.contentWidth \* 0.97 end if Player.x \< display.contentWidth \* 0 then Player.x = display.contentWidth \* 0.01 end end