attachDynamics

fun attachDynamics(dynamics: Dynamics<*>)(source)

Declare a dynamics so the velocity/force overlay (G10) can sample its per-agent velocities and net forces. Animation-only — no effect on the simulation. A Dynamics is a plain object the model holds, so the animation layer can't find it otherwise. Keyed by space name, so re-declaring each replication (e.g. from initialize()) overwrites rather than accumulates.


fun attachDynamics(dynamics: Dynamics3D<*>)(source)

Declare a 3D dynamics so the velocity/force overlay (G10) can sample it — the ContinuousVolume counterpart of the Dynamics overload above, and keyed the same way, so re-declaring each replication overwrites rather than accumulates.

Samples are flattened to the x–y plane, since the overlay event carries no z channel; see Dynamics3D.overlaySample.