Upgrading from 5.x

Verlet Motion Toolkit 6.0 is a breaking release. This page lists what changed since 5.x and what to do about it. The first items can change behaviour or break code in an existing project.

  1. New requirements. Verlet Motion Toolkit now needs Game Framework 1.4.0 or later (Heathen Toolbox installs it) and Burst, along with Mathematics. It is standalone: it does not depend on Toolkit for Unity Physics or any other Heathen Toolkit. If you installed Unity Physics only for Verlet, you can remove it.
  2. Retune your jiggle settings. The simulation was rewritten, so the meaning of several settings changed and old values will not give the old feel. elasticity is now a spring stiffness in newtons per metre. There is a new mass curve in kilograms. Damping is the motion lost per sixtieth of a second, and maxSpeed is in metres per second (the sample assets went from 10 to 100, raise any of your own). The simulation now runs on a fixed step, simulationRate, with substeps inside it. Start from one of the sample settings assets and adjust.
  3. 2D trees use VerletTransformNode. VerletTransformNode2D is removed because the 2D and 3D simulations now share one core. Update any code that referenced the 2D node type. The 2D tree now honours the speed limit, uses the same stiffness and angle limit as 3D and keeps Z on the plane of the root.
  4. AddForceAtPosition(forceMagnitude, position, radius) now pushes nodes away from the point, strongest at the point and fading to nothing at the radius.
  5. Ropes were rewritten on a Burst rope kernel. VerletSegmentData lost FreeSwinging, ClampBack and MaxLength and gained Compliance. Rope damping is now quadratic drag. constraintIterations is replaced by substeps and iterations. Add stretchCompliance to your rope settings if you want a springier rope. Retune ropes that you tuned against 5.x.
  6. Rope control points follow the object. Control points are in the local space of the rope object, so its rotation and scale now apply. A rope on a rotated or scaled object will look different until you adjust it.
  7. Ropes ignore trigger colliders, and every point of a rope now collides, not only some of them. Ropes also ignore the colliders of their own pins, controlled by ignorePinColliders.
  8. VerletLineCollisionSegment and VerletLine.Threading are removed. Remove references to them.
  9. Editor code moved. The rope inspector and the curve drawer are now in an Editor assembly. Any code that referenced them must move into editor-only code.
  10. Sample renamed. Sample1Beahviour is now Sample1Behaviour.
  11. Changing curves by code. Trees cache their settings. If you reshape a curve in code while trees run, call settings.MarkChanged().

New in 6.0 #

  • A fixed game-time clock for jiggle trees, with substeps, mass, real-unit elasticity and contact solved inside the step, so the motion is the same at any frame rate and frame spikes do not shake the chains.
  • Teleport() on trees and components, and pre-warm (prewarm, prewarmSeconds, Warm()) on trees and ropes.
  • maxMillisecondsPerFrame, a shared cost budget for all trees.
  • A Burst rope kernel and a shared Burst mesh system, with pin modes, rigidbody load through ForceTransfer pins, stretchCompliance, collision on every point, own-pin collider exclusion and an ignore list.
  • An Entities layer for jiggle chains, in the Heathen.Verlet.Entities assembly.
  • Rebuild() on ropes, exact rendering of static pins, a 2D example scene, and a rope bridge sample.
  • System Log categories Verlet.Transforms and Verlet.Line, with gates Heathen.LogGates.Verlet.Transforms and .Line.
  • XML documentation on every public type and member, and tests.

Fixed in 6.0 #

  • A one-pin rope did not hang at full length and stretchiness did nothing.
  • NaN after pausing with a time scale of zero, and NaN for a bone sitting on its parent.
  • The 2D angle limit for a straight-down chain.
  • A probe collider created at the world origin.
  • AddPin before Start, unbounded rope length, gizmo cost, and bone data being saved into scenes.
  • Chains wagging and whipping at high or uneven frame rates, and starting out wagging.

Rate This Article!