need help for the touch functions

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
white hawk
Prole
Posts: 2
Joined: Wed Mar 01, 2017 6:44 pm

need help for the touch functions

Post by white hawk »

Hey guys, i want a good example of how to use the touch functions, for example i'm using a button img and i tried the collision function on mouse_x,mouse_y and button_x,button_y it worked fine on my computer but not on my android. And i didn't find anything in the wiki that help me for the touch functions.
User avatar
Tjakka5
Party member
Posts: 243
Joined: Thu Dec 26, 2013 12:17 pm

Re: need help for the touch functions

Post by Tjakka5 »

love.mousepressed gets called when there's a mouse button click, or a tap from a touchscreen.
You can use this for your collision detection.
( I'm guessing you're checking it in love.update right now, with love.mouse.getPosition )

There's also the love.touch module. It consists of functions to check for touches.

I hope this helps.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 186 guests