onApplyDisplacement method

void onApplyDisplacement(
  1. double dt
)

Implementation

void onApplyDisplacement(double dt) {
  velocity = onVelocityUpdate(dt, velocity);
  if (!velocity.isZero()) {
    super.position += displacement = velocity * dt;
    _updateLastDirection(velocity);
  } else {
    displacement.setZero();
  }
}