smooth Damp
Gradually changes a value towards a desired goal over time.
Return
The new position following the smooth damp. The new velocity is stored in the currentVelocity reference, for when this method is called again. Any clamping of this value to minimum limits is left to your discretion.
Parameters
The position we want to be at.
The current velocity of the current position moving towards the target. This ref is modified by this function and should be passed back into it on subsequent calls.
Approximately the time it will take to reach the target.
The maximum velocity that may be achieved when moving current->target.
The time since the last call to this method.
Gradually changes an angle towards a desired goal over time.
Return
The new angle following the smooth damp. The new ang. velocity is stored in the currentVelocity reference, for when this method is called again. Any clamping of this value to minimum limits is left to your discretion.
Parameters
The angle we want to be at.
The current angular velocity of the current position moving towards the target. This ref is modified by this function and should be passed back into it on subsequent calls.
Approximately the time it will take to reach the target.
The maximum velocity that may be achieved when moving current->target.
The time since the last call to this method.