Hi,
I move my object by
transition.to( bicycle, { time=0, x=event.x, y= event.y } )
but when i try to move my finger really fast my bicycle escape under my finger, that was generating little lag, can i somehow avoid something like this?
Hi,
I move my object by
transition.to( bicycle, { time=0, x=event.x, y= event.y } )
but when i try to move my finger really fast my bicycle escape under my finger, that was generating little lag, can i somehow avoid something like this?
Your best bet when moving objects based on touch is to have a Runtime listener updating the position of your object as you move your finger. Something like this:
local function movePlayer() player.x = event.x; player.y = event.y end Runtime:addEventListener("enterFrame", movePlayer)
Here’s the Corona documentation on how to interact with Events and setting focus. Very useful when dealing with mobile apps!
http://docs.coronalabs.com/guide/events/detectEvents/index.html#understanding-hit-events
Your best bet when moving objects based on touch is to have a Runtime listener updating the position of your object as you move your finger. Something like this:
local function movePlayer() player.x = event.x; player.y = event.y end Runtime:addEventListener("enterFrame", movePlayer)
Here’s the Corona documentation on how to interact with Events and setting focus. Very useful when dealing with mobile apps!
http://docs.coronalabs.com/guide/events/detectEvents/index.html#understanding-hit-events