The first touch works ok. Subsequent touches will have two pointer downs (cursor needs to leave canvas before next touch). If you remove pointer move from the mask it seems to fix it. Not a huge deal but thought I would let you guys know.
I think I know what’s going on. So, what’s happening is that when a pointerdown
event is fired, if the coordinates for the down differ by some amount to the last move received, the pointerdown
event is then sent through the onInputChangedObservable
chain to process the move. While it’s technically a pointerdown
event, it’s being consumed as though it was a move. It was originally a workaround for an issue where some event data wasn’t being used as part of the click. TBH, I’m looking at the code now and I’m not 100% sure that we need the aforementioned code so lemme see if I can remove it (which should remove that second event).
My code was expecting one pointer down and then a pointer up. I realize now with touch devices I can’t expect that since you could place multiple fingers onto the screen causing many pointer downs without a single pointer up. It’s not a good idea for me to assume the number of events that will be received.