Get the direction of the cursor

I added the cursor script from the defold samples, works perfect , I want to know how to get the direction of the mouse/touch, I try to added the gesture example, but seems to need the same actionid and maybe some conflict or I setup bad (I added the in folder with the gesture.lua).

Some idea to get direction of the cursor when is on “drag_start” ?

thanks in advance!

Is this using the defold-input library?

The input message has dx and dy (which means “delta X” and delta Y")

2 Likes

yes, I currently use the cursor reference

So you want to know how to combine the cursor module and the gesture module? Please create a ticket on GitHub and I’ll see if I can provide an example. I haven’t tried combining them myself but it should work.

1 Like

Already created a ticket :slight_smile:

Thanks!

Great. I’ll take a look as soon as I have some time.