When two colliders are in contact, the physics system uses the surface properties of each colliderAn invisible shape that is used to handle physical collisions for an object. A collider doesn’t need to be exactly the same shape as the object’s mesh - a rough approximation is often more efficient and indistinguishable in gameplay. More info
See in Glossary to calculate the total friction and bounce between the two surfaces.
In Unity, you use the Physic Material asset to control these parameters. The Physic Material asset is represented in the API by the PhysicsMaterial
class.
The Physic Material asset provides two properties: Friction Combine (PhysicsMaterial.frictionCombine
) and Bounce Combine (PhysicsMaterial.bounceCombine
). These properties each provide four options to control how the physics system calculates the total friction and bounce between two colliders:
Priority | Property | Description |
---|---|---|
1 | Maximum | Use the largest of the two values. |
2 | Multiply | Use the sum of one value multiplied by the other. |
3 | Minimum | Use the smallest of the two values. |
4 | Average | Use the mean average of the two values; that is, the sum of both values, divided by two. |
Friction Combine applies to both Dynamic FrictionA Physics Material property that defines the friction for a Rigidbody when it’s in motion. Lower values mean less friction, so a setting of zero represents slipping on ice. More info
See in Glossary and Static Friction.
The properties in the table are in priority order. Unity takes priority into consideration when the colliders in a collider pair have Physic Material assets with different combine settings. For example, if one Physic Material asset’s Friction Combine is set to Average, and the other Physic Material asset’s Friction Combine is set to Maximum, Unity uses the Maximum calculation.