Guest User

Untitled

a guest
Mar 24th, 2019
56
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Properly Lerp between two angles
  2. Vector3 AngleLerp(Vector3 StartAngle, Vector3 FinishAngle, float t)
  3. {
  4. float xLerp = Mathf.LerpAngle(StartAngle.x, FinishAngle.x, t);
  5. float yLerp = Mathf.LerpAngle(StartAngle.y, FinishAngle.y, t);
  6. float zLerp = Mathf.LerpAngle(StartAngle.z, FinishAngle.z, t);
  7. Vector3 Lerped = new Vector3(xLerp, yLerp, zLerp);
  8. return Lerped;
  9. }
RAW Paste Data