Friction defined in Physics Materials has little to no effect

I can reproduce the problem reliably.

  1. Create three Physics Materials with friction set to .1, .3 and .6 respectively
  2. Create three spheres, add rigid bodies to each one
  3. Add Physics Materials, .1, .3. and .6 to the Colliders of each three spheres respectively.
  4. Create terrain and a Physics Material for it, set it to .5.

I took a video:

The sphere with a Physics Material of .1 edges barely ahead but then all three stay the same distance apart which shouldn’t happen because the friction on each one is different. They should all slow down and stop at different rates. I can even bump up the friction to 1 and the balls will still role forever.

It’s like there is no friction at all yet clearly the Physics Materials are correctly setting it. This looks like a bug to me.

Here’s the code to the FrictionTest class I placed on each sphere:

public class FrictionTest : MonoBehaviour
{
	public bool StartTest = false;
	public static bool StaticStartTest = false;
	public float Force = 1000;
	public Camera FollowCamera;
	public float smoothTime = 0.08F;
	private Vector3 velocity = Vector3.zero;

	private void Update()
	{
		//Crude workaround so setting StartTest on any one sphere will trigger all spheres
		if (StartTest == true)
		{
			StartTest = false;
			StaticStartTest = true;
		}

		if (StaticStaticStart == true)
		{
			StaticStartTest = false;
  			StartTest();
		}

		if (FollowCamera != null)
		{
			FollowCamera.transform.LookAt(this.transform.position);
			Vector3 desiredPosition = this.transform.position + new Vector3(1, 1, 3);
			Camera.main.transform.position = Vector3.SmoothDamp(Camera.main.transform.position, desiredPosition, ref velocity, smoothTime);
		}
	}

	public void StartTest()
	{
           Rigidbody rb = this.transform.GetComponent<Rigidbody>();
           rb.AddForce(new Vector3(0, 0, Force), ForceMode.Acceleration);
	}
}

Friction prevents sliding not rolling. The sphere on the left will be sliding ahead before going into a full roll. The only properties that will have any effect on them once they’ve all settled into rolling is their drag and angular drag.

“Friction prevents sliding not rolling” Was it always this way? In this video,

, of balls rolling across different materials their speed changes due to friction even though they’re rolling.

I suspect he froze the rotation of the balls and so they’re sliding across those surfaces. But it’s strange that he doesn’t mention it. Somebody in the comments section also wonders the same…

Friction in Physics Materials is realistic only if these settings are configured in the Physics Settings:

  • Friction Type: Patch Friction Type
  • Improved Patch Friction: Enabled

In any other combination of settings, friction is just a rough approximation based in the number of contact points, which means that configuring the Physics Materials is essentially trial & error.

Described in this Unity Blog post:

Also, ensure that the combination modes in Physics Materials are configured properly. The settings that provide physically correct behavior are “Multiply” for friction and “Maximum” for bounce:

  • For friction, “Multiply” allows either of the two materials to reduce the friction to zero regardless of the coefficient of the other. For example, any object will slide on ice.
  • For bounce, “Maximum” allows any material to bounce regardless of the bounce coefficient of the other. For example, an ideal rubber ball will bounce on any surface.

1 Like