ActionManager Delay

Hey everyone,

I recently ran into something from which I wonder if it’s intentional, a bug, or just a downside to the Action Manager. I noticed that when I use the action manager to trigger picking events, it becomes delayed when trying to trigger it in fast succession.

For example:
https://playground.babylonjs.com/#J19GYK#0

Try clicking the cubes that toggle from non-wireframe to wireframe really fast. You’ll notice the toggling won’t be as fast as you can click.

So yeah, is there a way to go around this while still using the action manager?

This is because of the way we are processing the pick trigger. If you switch to OnLeftPickTrigger you will see that it is running as fast as you click:

PGDemo | Babylon.js Playground (babylonjs.com)

This is because the pick trigger is triggered on pointer up (click down, click up = pick). If you just want the pointer down, use OnLeftPickTrigger or the OnPickDownTrigger

1 Like