• Hey! Guest! The 37th GMC Jam will take place between May 28th, 12:00 UTC and June 1st, 12:00 UTC. Why not join in! Click here to find out more!

Android / Amazon Fire How to detect drag direction?

C

Chowderchu

Guest
I'm new to mobile development and I'm struggling a bit with the gesture detection.

Can someone please offer me a simple GML solution for detecting the direction that the player drags their finger, before releasing?

I don't know how to do it in GML, so right now I am using the DnD Drag Start event, and I also have a Drag End event (please let me know the GML equivalent for these, if you know.)

The idea is that I would record the starting coordinate for the drag within the Drag Start event, and then I would compare that coordinate with the ending drag coordinate recorded in the Drag End event. The problem is that I don't know how to reference the starting coordinate. Is this handled by mouse_x and mouse_y?

Thanks in advance for any and all help!
 
C

Chowderchu

Guest
Looks like I answered my own question regarding the mouse_x, mouse_y (yes, they work for detection of the screen press.)

However I am still curious what the GML equivalents are for the DnD Global Drag Start and Global Drag End?
 
Top