Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


PhysicsChainDefinition

A PhysicsChain definition used to specify the chain of vertices that will produce multiple ChainSegmentGeometry shape types. Additionally, non-geometric properties can be specified here.
Read time 1 minuteLast updated 10 days ago

Definition

public struct PhysicsChainDefinition

Constructors

Constructor

Description

PhysicsChainDefinition()Create a default PhysicsChain definition.
PhysicsChainDefinition(System.Boolean)Create a default PhysicsChain definition.

Properties

Property

Description

contactFilterThe contact filter used to control which contacts this shape can participate in.
isLoopIndicates a closed chain formed by connecting the first and last vertices specified. When enabled, no ghost vertices should be defined in the ChainGeometry.vertices with all being used to define ChainSegmentGeometry with the ghost vertices being calculated automatically to force a closed loop. When disabled, the ChainGeometry.vertices should define ChainSegmentGeometry.ghost1 as the first vertex followed by at least two vertices or more defining the subsequent edges and finally a ChainSegmentGeometry.ghost2 vertex, therefore there must be at least 4 vertices.
surfaceMaterialThe surface material for the shape comprising of many properties such as friction, bounciness, rolling resistance etc.
triggerEventsControls whether this chain produces trigger events which can be retrieved after the simulation has completed. This applies to triggers and non-triggers alike.

Static Properties

Property

Description

defaultDefinitionGet a default PhysicsChain definition.