Rotation/Tracking:
- Manages the rotation of the attacker to face toward a direction (usually towards its target)
- Usually decreases over the course of the attack but in some cases increases from 0 value. (AnimationCurve approach is good here imo.
- Tracking just means how quickly it rotates toward its target while maintaining momentum.
I’m not sure what the best approach is here but I need to use the set the rotation inside a coroutine with an animation curve. Should I be using Lerp? The attack duration varies.
Movement:
- Manages the position of the attacker. Usually towards the target.
- As stated above the movement value changes throughout the course of the attack/animation
- Stops the movement on the z/forward position if it collides with a target but maintains its Y and X position.
For movement should I be using Lerp or transform.position += direction * currentMoveSpeedCurve.Evaluate(). As for stopping the movement, should I use a raycast to check if it ran into something?