Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Move object on touch — Gideros Forum

Move object on touch

Unknown Member
edited July 2012 in General questions
Hi guys,
how can move an object just by touching the screen and it will move until i release my touch
i trying to do it by:
btn_right:addEventListener("click",
function ()
ship.xdirection = -1
local x = ship:getX()
x = x + (ship.xdirection * ship.xspeed)

if x < 0 then
ship.xdirection = -1
end

ship:setX(x)
end)
but it only moves it when i touch the screen , i need a flowing movement

Likes: marbolec

+1 -1 (+1 / -0 )Share on Facebook

Comments

Sign In or Register to comment.