duck

duck

May 7th, 2010
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.17 KB | None | 0 0
  1. Quaternion targetRot = Quaternion.LookRotation(targetPosition - transform.position);
  2. transform.rotation = Quaternion.Slerp( transform.rotation, targetRot, 2f * Time.deltaTime );
Advertisement
Add Comment
Please, Sign In to add comment