Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


PhysicsShape.SurfaceMaterial

Defines the dynamics of a surface on a shape.
Read time 2 minutesLast updated 13 days ago

Definition

public struct PhysicsShape.SurfaceMaterial

Constructors

Constructor

Description

SurfaceMaterial()Create a default surface material.

Properties

Property

Description

bouncinessThe bounciness (coefficient of restitution) usually in the range [0, 1].
bouncinessMixingDefines the method used when mixing the bounciness values of two shapes to form a contact.
bouncinessPriorityThe priority for mixing the PhysicsShape.bounciness properties when two shapes come into contact. If the priority of one shape is higher than the other shape then the higher priority PhysicsShape.SurfaceMaterial.bouncinessMixing will be used. If the priority of both shapes are the same then simply the higher enumeration value of PhysicsShape.SurfaceMaterial.MixingMode from both shapes will be used.
customColorCustom 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 debug drawing. The alpha value here is always ignored. This is only used in the Unity Editor or in a Development Player. See Color.clear and Draw.
frictionThe Coulomb (dry) friction coefficient, usually in the range [0, 1].
frictionMixingDefines the method used when mixing the friction values of two shapes to form a contact.
frictionPriorityThe priority for mixing the PhysicsShape.friction properties when two shapes come into contact. If the priority of one shape is higher than the other shape then the higher priority PhysicsShape.SurfaceMaterial.frictionMixing will be used. If the priority of both shapes are the same then simply the higher enumeration value of PhysicsShape.SurfaceMaterial.MixingMode from both shapes will be used.
rollingResistanceThe rolling resistance usually in the range [0, 1].
tangentSpeedThe tangent (surface) speed.

Static Properties

Property

Description

DefaultGet the default surface material.

Enums

Enum

Description

PhysicsShape.SurfaceMaterial.MixingModeThe method used to mix friction or bounciness values.