Rotates currentAngle
towards targetAngle
, taking the shortest rotation distance. The lerp
argument is the amount to rotate by in this call.
name | type | arguments | Default | description |
---|---|---|---|---|
currentAngle | number |
The current angle, in radians. |
||
targetAngle | number |
The target angle to rotate to, in radians. |
||
lerp | number | <optional> | 0.05 |
The lerp value to add to the current angle. |
The adjusted angle.