piqnt / planck.js

2D JavaScript Physics Engine
http://piqnt.com/planck.js/
MIT License
4.91k stars 236 forks source link

Changing a circle collider's friction doesn't make it roll slower #229

Closed quinton-ashley closed 1 year ago

quinton-ashley commented 1 year ago

I recently had a student show me that changing a circle collider's friction doesn't make it roll slower, neither does changing the friction of the box or chain collider it rolls on.

The student and I expected friction to affect the rate at which a ball rolls. I know that users could use rotationDrag but when users just try to change the friction of a rotated floor it's confusing that it doesn't work.

Could this bug be fixed in planck?

shakiba commented 1 year ago

I made an example here: https://piqnt.com/space/34SG2bT9V

Slipping is faster, and the reason is explained here:

Less energy is converted into rotational kinetic energy if there is slipping, and thus (per energy conservation) more is converted into translational kinetic energy, which is a measure of the falling speed.