SHARE
TWEET

rotation

a guest Mar 26th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.  }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top