Version: Unity 6.6 Alpha (6000.6)
LanguageEnglish
  • C#

PhysicsChain.UpdateVertices

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public void UpdateVertices(ReadOnlySpan<Vector2> vertices, bool isLoop);

Parameters

Parameter Description
vertices 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.

Description

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.