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