RotateOverTime.cs 765 B

12345678910111213141516171819202122232425
  1. /*===============================================================================
  2. Copyright (C) 2022 Immersal - Part of Hexagon. All Rights Reserved.
  3. This file is part of the Immersal SDK.
  4. The Immersal SDK cannot be copied, distributed, or made available to
  5. third-parties for commercial purposes without written permission of Immersal Ltd.
  6. Contact sdk@immersal.com for licensing requests.
  7. ===============================================================================*/
  8. using UnityEngine;
  9. public class RotateOverTime : MonoBehaviour
  10. {
  11. [SerializeField]
  12. private Vector3 m_Axis = new Vector3(0f, 1, 0f);
  13. [SerializeField]
  14. private float m_Speed = 40f;
  15. void Update()
  16. {
  17. transform.Rotate(m_Axis, m_Speed * Time.deltaTime);
  18. }
  19. }