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.

1 answer 1

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

  • Thank you, sort of what you need!) I missed Vector3.RotateTowards - CGLike