기술 자료

Unity Engine

Unity Engine

UpdateVertices(ReadOnlySpan<Vector2>, bool)

Update the existing ChainSegment shapes with the provided vertices. Modifying the vertices will cause contacts to be recalculated however it may cause overlaps and/or collision tunnelling if not used carefully. The number of vertices provided and looping option should be the same as was used when the Chain was originally created. Any mismatch between the two will result in a warning.
읽는 시간 1분최근 업데이트: 21일 전

Definition

  • Type: Method
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public void UpdateVertices(ReadOnlySpan<Vector2> vertices, bool isLoop)

Parameters

The vertices used to update the existing ChainSegment shapes.

isLoop

Indicates a closed chain formed by connecting the first and last vertices specified. This should match what was originally specified in PhysicsChainDefinition.isLoop.