On Monogame 3.7, I try to get the gesture working on Android and it seems I don’t get any kind of gesture data. The regular touches are working fine and I also EnabledGestures. Here’s the sample code :
//Enable DragComplete Gesture
TouchPanel.EnabledGestures = GestureType.DragComplete;
while (TouchPanel.IsGestureAvailable)
{
GestureSample MyGesture = TouchPanel.ReadGesture();
if (MyGesture.GestureType == GestureType.DragComplete)
{
rightStickState = new Vector2(MyGesture.Position2.X - MyGesture.Position.X, MyGesture.Position.Y - MyGesture.Position2.Y);
rightStickState.Normalize();
}
}
is there anything else I need to enable or something?
Yes, infact that’s the first line in my code above.
I can use the touchcollection to do my own implementation but it seems gesture support is already built-in so wondering why it’s not working. Even registering and checking a simple gesture like Tap is not working, very strange!
Ok, ill have ro test my touch implememtation on android, pretty sure this works on Windows with a touch screen. I’ll see if i can run it in my S10 and Kundel Fire.
Ill let you know how I get on once I get around to trying it.
Thank you very much for letting me know that it works for you. I now suspect the Monogame version I use might be the problem as I tried on 2 different devices as well. My Monogame dll version seems to be 3.7.0.1708, could you please let me know yours?
Thank you very much again for the lengthy reply. In my case I ended up implementing my own gesture recognizer using the touch data and but I’m sure these information will be helpfull for others.