using System.Collections; using System.Collections.Generic; using UnityEngine; public class RotationController : MonoBehaviour { #region Read-Only Fields public float RotationPeriod => m_RotationPeriod; public Vector3 Position => transform.position; #endregion Read-Only Fields [SerializeField] private float m_RotationPeriod; private void FixedUpdate() { transform.Rotate(Vector3.forward, 360/m_RotationPeriod * Time.fixedDeltaTime, Space.World); } }