New scene triggers for physics engine

Hi everybody,

In my project, I use BABYLON.ActionManager.OnEveryFrameTrigger to handle some events related (among others) with physics. For example to apply an impulse somewhere, or to actuate a motor.

However it appears to me that a much better time to deal with the physics engine would be just before or just after a physics step. It would be more efficient and certainly more robust (I fear that my current implementation can skip or multiply impulses).

What about these 2 new scene triggers?

  • BABYLON.ActionManager.OnBeforePhysicsStepTrigger
  • BABYLON.ActionManager.OnAfterPhysicsStepTrigger


1 Like

Adding @Cedric

Sounds doable to me. I add this task to my todo list!

1 Like

That would be very helpful IMO, thank you!