Version: Unity 6.3 Beta (6000.3)
LanguageEnglish
  • C#

SurfaceMaterial

struct in UnityEngine.LowLevelPhysics2D

/

Implemented in:UnityEngine.Physics2DModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Defines the dynamics of a surface on a shape.

Static Properties

Property Description
Default Get the default surface material.

Properties

Property Description
bounciness The bounciness (coefficient of restitution) usually in the range [0, 1].
bouncinessCombine Defines the method used when mixing the bounciness values of two shapes to form a contact.
bouncinessPriority The priority for combining 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.bouncinessCombine will be used. If the priority of both shapes are the same then simply the higher enumeration value of UnityEngine.PhysicsMaterialCombine2D from both shapes will be used.
customColor 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 debug drawing. The alpha value here is always ignored. This is only used in the Unity Editor or in a Development Player. See UnityEngine.Color.clear and LowLevelPhysics2D.PhysicsWorld.Draw.
friction The Coulomb (dry) friction coefficient, usually in the range [0, 1].
frictionCombine Defines the method used when mixing the friction values of two shapes to form a contact.
frictionPriority The priority for combining 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.frictionCombine will be used. If the priority of both shapes are the same then simply the higher enumeration value of UnityEngine.PhysicsMaterialCombine2D from both shapes will be used.
rollingResistance The rolling resistance usually in the range [0, 1].
tangentSpeed The tangent (surface) speed.

Constructors

Constructor Description
PhysicsShape.SurfaceMaterial Create a default surface material.