기술 자료

Unity Engine

Unity Engine

Create

Create a Chain of multiple shapes attached to the specified body which itself is within a world.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

  • Type: Method
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule

Create(PhysicsBody, ChainGeometry, PhysicsChainDefinition)

Create a Chain of multiple shapes attached to the specified body which itself is within a world.
public static PhysicsChain Create(PhysicsBody body, ChainGeometry geometry, PhysicsChainDefinition definition)

Parameters

The body to attach the shape(s) to.

The shape geometry to use.

The shape definition to use.

Returns

Type

Description

PhysicsChainThe created shape.

Create(PhysicsBody, ReadOnlySpan<Vector2>, PhysicsChainDefinition)

Create a Chain of multiple shapes attached to the specified body which itself is within a world.
public static PhysicsChain Create(PhysicsBody body, ReadOnlySpan<Vector2> vertices, PhysicsChainDefinition definition)

Parameters

The body to attach the shape(s) to.

The vertices that will create the ChainSegment shapes.

The shape definition to use.

Returns

Type

Description

PhysicsChainThe created chain.