Possible to override the effects of collisions?

Is it possible to override the effects of collisions? For example, maybe I could supply a callback that nphysics calls whenever a collision occurs. That callback performs all velocity changes.

This is currently not possible, but that’s an interesting feature that could be added.
Would you have an example of use-case for this? Having a concrete use-case in mind would help me design the public interface.

Also by “overriding the effects of collisions” do you also include position changes (due to nphysics trying to fix penetration)? Or would you find it more useful to just set the velocities yourself but let nphysics move the objects to fix penetrations?

1 Like

There are cases where a general-purpose physics engine does not cut it. For example, billiards simulation. Maybe in such cases there can be a way for the programmer to specify what happens after each collision without having to edit the code directly.

I’ve heard of this being used to simulate a conveyor in bullet physics. Or does nphysics have a different way that could be used to simulate a conveyor?