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.
Read time 1 minuteLast updated 9 days ago
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.