Hey I’m having a small trouble in making an object move a button is pressed. I know how to move the character. But my real problem is I want to move the character when the button is kept down press instead of tapin , over and over, and over Just to have it move. I want it to move when button is pressed down like a real button. Here is how I have it.
local function movel (event)
if event.phase == "began" then
player:setLinearVelocity( 200, 0 )
end
end
leftb:addEventListener("touch", movel)
How do I make it so I’m not tapping it every time to move it, but just pressing down for the player to move.
Thanks [import]uid: 17058 topic_id: 26349 reply_id: 326349[/import]
[import]uid: 17058 topic_id: 26349 reply_id: 106823[/import]