update method

void update(
  1. double dt
)

Updates the component position to match the target.

Implementation

void update(double dt) {
  final target = _target;
  if (target != null && _lastTargetPosition != target.absolutePosition) {
    _lastTargetPosition = target.absolutePosition.clone();
    _comp.position = _lastTargetPosition! + (_offset ?? _zero);
  }
}