Hi
I have a code here
local function onKeyEvent( event ) if event.nativeKeyCode == 65 then -- A ship.rotation = ship.rotation - 3 end if event.nativeKeyCode == 68 then -- D ship.rotation = ship.rotation + 3 end if event.nativeKeyCode == 87 then -- W ship.y = ship.y - 30 end if event.nativeKeyCode == 83 then -- S ship.y = ship.y + 3 end return false end
I’m using W A S D buttons, to move something, but I have to press the buttons in every single movement. How can I move something with constant pressure?