# PhysicsShape.SurfaceMaterial

> Defines the dynamics of a surface on a shape.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.U2D.Physics](/engine/6000.5/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule

```csharp
public struct PhysicsShape.SurfaceMaterial
```

## Constructors

| Constructor                                                                                                                                       | Description                        |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| [SurfaceMaterial()](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/surfacematerial/ctor.md#surfacematerial\(\))                   | Create a default surface material. |
| [SurfaceMaterial(System.Boolean)](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/surfacematerial/ctor.md#surfacematerial\(bool\)) | Create a default surface material. |

## Properties

| Property                                                                                                                   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| -------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [bounciness](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/surfacematerial/bounciness.md)                 | The bounciness (coefficient of restitution) usually in the range \[0, 1].                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| [bouncinessMixing](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/surfacematerial/bouncinessmixing.md)     | Defines the method used when mixing the bounciness values of two shapes to form a contact.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [bouncinessPriority](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/surfacematerial/bouncinesspriority.md) | The priority for mixing the [\_bounciness](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/bounciness.md) properties when two shapes come into contact. If the priority of one shape is higher than the other shape then the higher priority [\_bouncinessMixing](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/surfacematerial/bouncinessmixing.md) will be used. If the priority of both shapes are the same then simply the higher enumeration value of [PhysicsShape.SurfaceMaterial.MixingMode](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/surfacematerialmixingmode.md) from both shapes will be used. |
| [customColor](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/surfacematerial/customcolor.md)               | Custom debug draw color. Any color value other than (0,0,0,0) will be used to render the shape. This value is passed back when using the [PhysicsWorld](/engine/6000.5/script-reference/unity/u2d/physics/physicsworld.md) drawing. The alpha value here is always ignored.                                                                                                                                                                                                                                                                                                                                                                                      |
| [friction](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/surfacematerial/friction.md)                     | The Coulomb (dry) friction coefficient, usually in the range \[0, 1].                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [frictionMixing](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/surfacematerial/frictionmixing.md)         | Defines the method used when mixing the friction values of two shapes to form a contact.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [frictionPriority](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/surfacematerial/frictionpriority.md)     | The priority for mixing the [\_friction](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/friction.md) properties when two shapes come into contact. If the priority of one shape is higher than the other shape then the higher priority [\_frictionMixing](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/surfacematerial/frictionmixing.md) will be used. If the priority of both shapes are the same then simply the higher enumeration value of [PhysicsShape.SurfaceMaterial.MixingMode](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/surfacematerialmixingmode.md) from both shapes will be used.         |
| [rollingResistance](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/surfacematerial/rollingresistance.md)   | The rolling resistance usually in the range \[0, 1].                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| [tangentSpeed](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/surfacematerial/tangentspeed.md)             | The tangent (surface) speed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |

## Static Properties

| Property                                                                                                             | Description                       |
| -------------------------------------------------------------------------------------------------------------------- | --------------------------------- |
| [defaultMaterial](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/surfacematerial/defaultmaterial.md) | Get the default surface material. |

## Enums

| Enum                                                                                                                                   | Description                                           |
| -------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| [PhysicsShape.SurfaceMaterial.MixingMode](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/surfacematerialmixingmode.md) | The method used to mix friction or bounciness values. |
