Advertisement
Guest User

rotation

a guest
Mar 26th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. float speed = 0.1f;
  2. Vector3 destinationRotation = new Vector3(100.0f, 203.0f, 202.0f);
  3.  
  4. private void Update()
  5. {
  6. transform.rotation = Quaternion.Lerp(transform.rotation, Quaternion.Euler(target), Time.deltaTime * speed);
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement