update method
Update the system
Implementation
@override
void update(double deltaTime) {
if (_physics?.isDisposed ?? false) return;
_refresh();
// Nothing 3-D yet: no world to make, step or read.
if (_physics == null && _bodies.isEmpty && _characters.isEmpty) return;
_followLayers();
_bodies.sync(deltaTime);
_joints.sync(world);
if (deltaTime > 0) _characters.move(deltaTime);
if (deltaTime > 0) {
physics.step(
deltaTime,
collisionSteps: math.max(1, (deltaTime / collisionStep - 1e-6).ceil()),
);
_stepIndex++;
}
_bodies.readBack(_stepIndex);
_joints.readBack();
_contacts.dispatch(world.events, stepped: deltaTime > 0);
}