ActionManager: Picking Order (OnPick, OnLeftPick, OnRightPick)

Dear community,

if I register the normal pick triggers (OnPickDown, OnPick, OnPickUp), the triggers are executed in an order I would expect - OnPickDown when the mouse (or touch) is pressed, OnPick and OnPickUp when the mouse is released. However, for OnLeftPick and OnRightPick, the triggers are executed together with OnPickDown instead, so they are firing already when the mouse button is pressed. Is this working as intended or is this a bug?

A PG showing the behavior can be found here: Babylon.js Playground

Kind regards

They are indeed defined with the down pick on code:, through I can’t say why it was defined like this :sweat_smile:

1 Like

Thank you for your quick answer! At the moment, we simply use the pick trigger and check the event data to derive the mouse button, so it is not a big issue. I’d still love to know if there is some intention behind the implemented behavior.

I would bet either the person had some sort of drag & drop in mind or simply a mistake :thinking:

You can however use pointerObservables to get any behaviour you want

1 Like