PhysicsMaterial2D
Asset type that defines the surface properties of a Collider2D.
Read time 4 minutesLast updated 4 days ago
Definition
- Type: Class
- Namespace: UnityEngine
- Assembly: UnityEngine.Physics2DModule
- Inherits from: Object
public sealed class PhysicsMaterial2D : Object
Remarks
When two Colllider2D come into contact, the physics system uses both friction and bounciness if it needs to calculate a collision response.
Properties
Property | Description |
|---|---|
| bounceCombine | Determines how the effective bounciness is calculated when two Collider2D come into contact. |
| bounciness | Coefficient of restitution. |
| friction | Coefficient of friction. |
| frictionCombine | Determines how the effective friction is calculated when two Collider2D come into contact. |
Static Methods
Method | Description |
|---|---|
| GetCombinedValues | Calculates the effective value used when two Collider2D come into contact with their own PhysicsMaterial2D. |
Inheritance
Operators
Operator | Description |
|---|---|
| operator == | Compares two object references to see if they refer to the same object. |
| bool | Determines whether the object exists. |
| operator != | Compares if two objects refer to a different object. |