Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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

bounceCombineDetermines how the effective bounciness is calculated when two Collider2D come into contact.
bouncinessCoefficient of restitution.
frictionCoefficient of friction.
frictionCombineDetermines how the effective friction is calculated when two Collider2D come into contact.

Static Methods

Method

Description

GetCombinedValuesCalculates the effective value used when two Collider2D come into contact with their own PhysicsMaterial2D.

Inheritance

Inherited Members

Operators

Operator

Description

operator ==Compares two object references to see if they refer to the same object.
boolDetermines whether the object exists.
operator !=Compares if two objects refer to a different object.