How is friction calculated in Roblox - why is the range 0 to 2?

Trying to create car physics and would be really useful to know how exactly friction is calculated in Roblox! Friction coefficient is of course [0, 1], so why is Friction in Roblox [0, 2]. Does it get halved?

edit: my mistake, friction coefficients can be greater than 1!

1 Like

I think (going off using it in the past) 1 is normal friction, and any values beyond 1 will have additional friction. (2 will be 2x friction force)

That’s not helpful. What is “normal friction”? The friction coefficient can’t go beyond 1 - that is impossible for a resistive force.

can you provide where you are trying to apply the friction?

trying to simulate forces made between a wheel contact patch on and a road

Nevermind, it is documented! I’m not sure how I missed this

nevermind again, the range of that function they provide is still [0,2]

The friction is calculated with a coefficient with range [0, 2] and then clamped. - just confirmed this from my own testing. From left to right each brick has friction 2, 1.5, 1, 0.5, 0.3. Surface 1 is 64 degrees, 2 is 63 degrees, 3 is 46 degrees, 4 is 45 degrees.


Interesting, and by clamp do you mean friction / 2, not clamp(friction, 0, 1)? If it were clamped, wouldn’t the first 3 bricks have the same results?

This is something I have genuinely wondered about too. But I am still confused with your explanation.

Why when the coefficients are allowed up to 2 the force needs to be clamped? What would be the difference here to coefficients up to 1? Also if the force was clamped, I still do not understand why the first 3 bricks have different results.

I thought friction would just be calculated like normal using their friction function they provided in the documentation as the coefficient for both static and kinetic friction. Where static friction applies enough force to keep the object stationary (up to the maximum amount of friction) and kinetic friction would provide a constant acceleration if no changes in normal force occur.

Overall, I do not see where anything is clamped or different when the coefficient is allowed to up to 2.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.