actionManager, OnLongPressTrigger

Hi.

So this is the situation. I am controlling the behavior of mesh (button) with an actionManager. I needed a longPressTrigger (and I found that you have that implemented, well played!), and it works just fine for the most part.

The issue I am getting is this, if I click the button down, and hold it (executing long press left click) it works. But if I click the button down, and while holding it I move cursor a bit (without leaving button area), then it doesn’t trigger the event.

I hope you understand my question. So basically moving the cursor after initial clickdown is not triggering the longPress.

Can I do anything about this. Here is a simple playground.
https://www.babylonjs-playground.com/#DXRQ3L#1

Thanks

I believe this is the expected behavior, just like any browser will deal with long press. Try long pressing in your phone while moving your finger on the screen. When is it s move and when a press?

If you are certain that you need long press, measure the time between down and up and decide on up whether or not you consider it a long press. Or better yet, and any down event start a timeout function that when triggered will check if nose up was not yet triggered. Simulate long press

It is not the expected behavior compared to normal browser behavior. A browser will avoid triggering a click on an element only if you move off of the element, not just move inside of it. If you have an element with a large space, and you move 200 pixels inside that element but do not leave the element, the browser will trigger a click.