I see @LeXXik’s commit for Rolling friction, but I seem to be at a loss for how to use it. Setting this.entity.rigidbody.rollingFriction
doesn’t seem to be doing anything.
What am I doing wrong?
I see @LeXXik’s commit for Rolling friction, but I seem to be at a loss for how to use it. Setting this.entity.rigidbody.rollingFriction
doesn’t seem to be doing anything.
What am I doing wrong?
Update:
It looks like I need to set rotation friction on both the dynamic and static rigidbodies. Still working out how to get it running more consistently.
In Ammo all of the friction models are simplified - the friction values of two objects are simply multiplied to each other to get a combined friction. The downside is that it is hard to simulate real life friction models of material vs material. The upside is that you can approximate the values to get “good enough” results pretty cheap.
For the rolling friction to work, both objects must have a rolling friction set to be over zero. Otherwise a combined rolling friction will be also zero. In order for the rolling friction constraint to be added to the body simulation, the magnitude of the difference in angular velocities of both objects must be over 0.001 (hardcoded in Bullet engine). For example, if one object is static, and the other is rotating (dynamic, not kinematic) then the difference will be the magnitude of the angular velocity vector of the dynamic body.
Thank you for explaining @LeXXik!
It’s good to know that the values are multiplied. I think I have enough information to to keep moving on my project.