Rope/Chain simulation system, ideal for character clothes such as scarves and capes.
- Simulation runs at a fixed timestep for consistency (framerate is user-configurable).
- Optional interpolation toggle for smooth animations.
- Cloth flowing on wind effect (useful for idle characters).
- Override system to change parameters on the fly for finer control of animations (e.g. decreasing simulation gravity during a character jump).
A demo of the example scene can be downloaded from: demo-windows.zip
Controls:
- Drag the yellow knob with the mouse.
Download or clone the source code and copy/paste the VerletChainSystem folder into your Assets folder.
-
Add the
VerletChaincomponent to an empty gameobject, this will add aLineRenderercomponent (don't forget to set the color, width and material). -
(Optional) Add the
VerletWavecomponent to get a wind-like effect on your rope/chain. -
(Optional) Create overrides by right clicking on the project view and selecting
Create -> Verlet Chain System -> Verlet Chain Override. To apply an override simply call theVerletChainOverride.Applyfunction and pass the reference to the chain that you wish to have it's parameters changed:myOverride.Apply(myChain);
