How to turn an object toward the other at a certain angle.
Not 2D, Quaternion.Lerp not that, all the same it is interpolation.
What else can I add I do not know.
We must first learn where to turn -
Vector3 newDir = Vector3.RotateTowards(transform.forward, (target.transform.position-transform.position), radian_angle, 0.0F); and turn
transform.rotation = Quaternion.LookRotation(newDir); radian_angle - rotation angle in radians
Vector3.RotateTowards - CGLikeSource: https://ru.stackoverflow.com/questions/625529/
All Articles