Eonirr

Untitled

Jan 27th, 2026
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. public AnimationCurve rotationCurve;
  2. public float rotationSpeed = 1f;
  3. private float curvePosition = 0f;
  4.  
  5. void Update()
  6. {
  7. curvePosition += rotationSpeed * Time.deltaTime;
  8.  
  9. float rotationValue = rotationCurve.Evaluate(curvePosition % 1f);
  10.  
  11. transform.Rotate(Vector3.up, rotationValue);
  12. }
Advertisement
Add Comment
Please, Sign In to add comment