Verlet Transforms
Last updated
Last updated
A MonoBehaviour component for simulating soft-body or chain-like animation behaviour using Verlet integration applied to multiple VerletTransformTree
instances. Typically used to drive physics-like behaviours on bones, joints, or pseudo-rigid chains.
The VerletTransforms
component acts as a controller that manages one or more VerletTransformTree
objects. Each tree defines a hierarchy of nodes that simulate physics-based motion via Verlet integration. This component provides global controls for registering nodes and applying forces, and it draws gizmos for visual debugging in the editor.
If enabled, gizmos will be drawn in the Scene view to visualise the simulated hierarchies.
The list of managed transform trees. Each VerletTransformTree
handles its own node hierarchy and settings.
Registers all nodes in the transformHierarchies
. This is typically called once at startup, but can be called manually to refresh the node layout in-editor.
Applies a global directional force to all transform trees.
Applies a radial force from a specific world position to all transform trees.
Applies a force to a specific tree by index. If the index is invalid, a warning is logged.
Returns a tree from transformHierarchies
at the given index. Logs a warning if the index is invalid.
Add VerletTransforms
to a GameObject.
Assign one or more VerletTransformTree
instances in the inspector.
Optionally, use the context menu "Register Nodes" to initialise the tree.
Generally input happens by moving the object or other objects moving into it (collision) however you can also inject force such as from an explosion or wind.