JoltPhysics
JoltPhysics copied to clipboard
Request for Anisotropic Friction
In Bullet Physics you can do Anisotropic Friction - meaning that friction e.g. is less when you slide forwards, and more when you slide sidewards. That is, friction has both a X and a Y component.
This is very nice if you simulate a skater skating on ice, but also has its application in e.g. mobile robots.
You can simulate/fake an Omni-directional wheel and a Mechanum wheel by using Anisotropic Friction.
I have looked into this in the several times in the past. It would require storing 2 direction vectors per contact constraint, which would cost quite a bit of memory given that there are a lot of contacts and we allocate for the worst case to avoid runtime allocations. A big refactor is needed to make it so that we would only incur this cost if the feature actually gets used. Personally, I have never needed it, so I feel it is a relatively rare use case.
The best thing you can do for now is to implement your own ContactListener as in the FrictionPerTriangleTest. You could modulate the friction based on the velocity of the object. I realize that this is not quite the same.