bevy_mod_picking icon indicating copy to clipboard operation
bevy_mod_picking copied to clipboard

Unable to get location for pointer Touch(0)

Open favilo opened this issue 1 year ago • 2 comments

I've been attempting to use the Pointer<Up> and Pointer<Down> events to handle touches on a mobile mancala game.

With the mouse, click events are working fine, but with touch input, I have to wait about 1 second for the Pointer<Up> event to be registered properly.

Here is the code I'm attempting to use.

I can see the Pointer<Down> pretty much every time, but if I let go too early, I get the following error:

Unable to get location for pointer Touch(0)

Clearly this is happening in pointer_events. But how can I ensure that the PointerLocation gets updated properly before the second is up?

favilo avatar Feb 27 '24 07:02 favilo

but if I let go too early

My best guess is it's caused by bevy's lack of event ordering within a frame.

aevyrie avatar Mar 03 '24 09:03 aevyrie

AFAIK, this is fixed by #319

Cyannide avatar May 06 '24 14:05 Cyannide

Fixed by #319

aevyrie avatar Jun 12 '24 06:06 aevyrie