Any experience with love.touchgestured?
Posted: Sat Dec 13, 2014 3:22 am
Any experience with love.touchgestured? I need to detect swipe gesture in my game, so I decided to use love.touchgestured function.
But I couldn't find some good example from wiki, so I decided to find it out myself how this function work.
This is my code:
I launched it from my android phone, but no result, It seems to love.touchgestured didn't called by love itself, because str was empty string after screen was touched.
If someone have experience with love.touchgestured, please share! thanks.
But I couldn't find some good example from wiki, so I decided to find it out myself how this function work.
This is my code:
Code: Select all
function love.load()
str = ""
end
function love.touchgestured(x, y, theta, distance, touchcount)
str = x ..":".. y ..":".. theta ..":".. distance ..":".. touchcount
end
function love.draw()
love.graphics.print(str)
end
If someone have experience with love.touchgestured, please share! thanks.