hey there,
i am building a small draw tool but struggle with the pointerEventTypes. According to the manual POINTERTAP only fires when there was no movement between pointerdown and -up. BUT in reality i can click, then slightly move the mouse and release the click – and it still will be registered as a POINTERTAP.
is there anything like a threshold to prevent this behavior?
With onPointerObservable, we actually have a type for double-click (BABYLON.PointerEventTypes.DOUBLETAP) that uses BABYLON.Scene.DoubleClickDelay as the value to measure between clicks. It works similarly to the code that you have above. If you’re trying to do something specificially against a DOUBLETAP, you could use something like:
scene?.onPointerObservable.add(pointerInfoEvent => {
// Do something on double-click
}, BABYLON.PointerEventTypes.DOUBLETAP);