Verlet Hierarchy
Last updated
Last updated
Support us as a GitHub Sponsor and get instant access to all our assets, exclusive tools and assets, escalated support and issue tracking and our gratitude. These articles are made possible by our GitHub Sponsors ... become a sponsor today!
Used by the Verlet Spring component to define a Verlet hierarchy.
Type | Name | Comment |
---|---|---|
You can add additional forces to the hierarchy in one of two ways
This will apply the force evenly to all nodes in the hierarchy and is useful for global forces such as wind, gravity and buoyancy.
This is usefor for positional forces such as explosions.
This simply walks the transform hierarchy of the root attribute and creates VerletParticle entries for any transform that is not being ignored. This is typically only ever called on create and typically at development time in the Unity Editor but can be used at run time if needed.
This is used to put all particles back to there initial states and is called when registering nodes at run time. In general it shouldn't need to be called manually.
This is called by the Verlet Spring to update the system and generally shouldn't be called manually.
Note velocity is applied as a global effect scaled by the inert setting value, time is the step in time to be simulated and is typically the Fixed Delta Time but may be scaled to "tighten" the simulation.
Transform
root
The root of the hierarchy. This node will not be moved but may rotate.
VerletHierarchySettingsReference
settings
Scriptab Reference for VerletHierarchySettings.
List<VerletParticle>
nodes
The list of particles managed by this system
List<Transform>
ignoreList
The transforms to exclude from simulation when registering particles
Vector3
restingVelocity
The constant velocity to remove from input velocity ... typically this is set as the local direction of acceleration of gravity when the system is at rest. This is typically only used by internal updates when the use resting flag is enabled in the VerletHierarchy settings.