CreateChain
Create a Chain attached to this body.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Method
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
CreateChain(ChainGeometry, PhysicsChainDefinition)
Create a Chain attached to this body.
public PhysicsChain CreateChain(ChainGeometry geometry, PhysicsChainDefinition definition)
Parameters
The geometry to use.
The chain definition to use.
Returns
Type | Description |
|---|---|
| PhysicsChain | The created chain. |
CreateChain(ReadOnlySpan<Vector2>, PhysicsChainDefinition)
Create a Chain of multiple shapes attached to this body.
public PhysicsChain CreateChain(ReadOnlySpan<Vector2> vertices, PhysicsChainDefinition definition)
Parameters
The vertices that will create the ChainSegment shapes.
The shape definition to use.
Returns
Type | Description |
|---|---|
| PhysicsChain | The created chain. |