Use a Physics MaterialA physics asset for adjusting the friction and bouncing effects of colliding objects. More info
See in Glossary 2D to adjust the friction and bounce that occur between 2D physics objects when they collide.
For more information on game physics, refer to 3D Physics.
To create a Physics Material 2D, go to Assets > Create > 2D > Physics Material 2D.
To use your Physics Material 2DUse this to adjust the friction and bounce that occurs between 2D physics objects when they collide More info
See in Glossary, assign it to the Material property of a Collider 2D or Rigidbody 2D component.
Note: The equivalent asset in 3D physics is referred to as a Physics Material.
A Physics Material 2D contains the following properties.
| Property | Description |
|---|---|
| Friction | Sets the coefficient of friction for this 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. The range is between 0 and 1. A value of 0 means no friction, like ice. A value of 1 means very high friction, like rubber. |
| Bounciness | Sets the degree to which collisionsA collision occurs when the physics engine detects that the colliders of two GameObjects make contact or overlap, when at least one has a Rigidbody component and is in motion. More info See in Glossary rebound from the surface. A value of 0 indicates no bounce while a value of 1 indicates a perfect bounce with no loss of energy. |
| Friction Combine | Defines how to combine both material friction values when two colliders interact. The options are:
|
| Bounce Combine | Defines how to combine both material bounciness values when two colliders interact. The options are:
|
PhysicsMaterial2D