SKYPRO_Sun_Rotator.cs 439 B

12345678910111213141516171819
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class SKYPRO_Sun_Rotator : MonoBehaviour
  5. {
  6. [SerializeField] private float rotationSpeed = 0.5f;
  7. void FixedUpdate()
  8. {
  9. Rotate();
  10. }
  11. void Rotate()
  12. {
  13. //transform.localEulerAngles.x + ((rotationSpeed / 10) * Time.deltaTime)
  14. transform.localEulerAngles = new Vector3(Time.time * rotationSpeed, 20, 0);
  15. }
  16. }