Version: 2022.2
Language : English
Custom Collider 2D
2D joints

Physics Material 2D

Switch to Scripting

A Physics Material 2D is used to adjust the friction and bounce that occur between 2D physics objects when they collide.

For more detailed information on game physics, see 3D Physics.

Use a Physics Material 2D

To create a Physics Material 2D, go to Assets > Create > 2D > Physics Material 2D.

Property: Function:
Friction Set 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
.
Bounciness Set 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.

To use your created Physics Material 2D, drag it onto an object with an attached 2D Collider component or drag it onto the collider in the InspectorA Unity window that displays information about the currently selected GameObject, asset or project settings, allowing you to inspect and edit the values. More info
See in Glossary
window.

Note: The equivalent asset in 3D physics is referred to as a Physic MaterialA physics asset for adjusting the friction and bouncing effects of colliding objects. More info
See in Glossary
.

PhysicsMaterial2D

Custom Collider 2D
2D joints