Conversation
Touch-events don't have intermediate move-events leading up to it like a mouse does. In the case of a touch-down event, an additional MousePos event needs to be dispatched ahead of the MouseButton event to position the cursor properly before registering the button-down event.
|
Heya, looking to merge this but I'm not familiar with touch event handling in the engine so couple of questions:
|
This is the primary fix in this case. Otherwise the touch-down event would just use the last position event, and touch-down at the last location the finger was touch-dragging at. Instead, a position-update and then a touch-down event is required to handle cases like a one-off tap.
Gestures get kind of tricky depending on the platform and felt a bit outside of the scope of this PR. It does sound appropriate though to ensure everything has a proper source-event. I notice that this fix works just fine for Android, but iOS also has some more nuances about the order in which it sends certain events, enough to sound like another PR. |
|
Thanks for the info! I should be able to set up a test on iOS, will drop an update when I get a chance. |
|
Hello |
Touch-events don't have intermediate move-events leading up to it like a mouse does. In the case of a touch-down event, an additional MousePos event needs to be dispatched ahead of the MouseButton event to position the cursor properly before registering the button-down event.