bulletphysics / bullet3

Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.
http://bulletphysics.org
Other
12.66k stars 2.88k forks source link

Spinning friction only applied if rolling friction > 0 #4188

Open esoma opened 2 years ago

esoma commented 2 years ago

https://github.com/bulletphysics/bullet3/blob/101c98cfb8fd297ebae6007fd10619f74c4a9748/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp#L1058-L1078

The multi body solver appears to handle this correctly: https://github.com/bulletphysics/bullet3/blob/5ae9a15ecac7bc7e71f1ec1b544a55135d7d7e32/src/BulletDynamics/Featherstone/btMultiBodyConstraintSolver.cpp#L1341-L1344

I've fixed this locally by employing the same logic. Happy to make a PR if this would be the intended behavior.

erwincoumans commented 2 years ago

Thanks, well spotted, please create a PR. We mostly use multibody for robotics, so we didn't notice it.

esoma commented 2 years ago

@erwincoumans #4205