I’m creating my first game which is pretty basic; I have a ship and two buttons that move the ship left and right. My problem is when I touch the left and right buttons too fast the ship just stops moving 
I’ve activated multitouch using system.activate(“multitouch”) but it doesn’t really help
Heres the code
[lua]-- Movement -----
local isMoving = {}
local movePlayerRight = function( event )
if isMoving == “right” then
playerShip.x = playerShip.x + 10
end
end
local movePlayerLeft= function( event )
if isMoving == “left” then
playerShip.x = playerShip.x - 10
end
end
– Controls -----
local function moveRight(event)
if (event.phase == “began”) then
isMoving = “right”
elseif (event.phase == “ended” or event.phase == “moved”) then
isMoving = {}
end
end
DpadrightArrow:addEventListener (“touch”, moveRight)
local function moveLeft(event)
if (event.phase == “began”) then
isMoving = “left”
elseif (event.phase == “ended” or event.phase == “moved”) then
isMoving = {}
end
end
DpadleftArrow:addEventListener (“touch”, moveLeft)
Runtime:addEventListener(“enterFrame”, movePlayerRight)
Runtime:addEventListener(“enterFrame”, movePlayerLeft)[/lua]
Thank You! [import]uid: 41389 topic_id: 19495 reply_id: 319495[/import]