2025-01-30 17:20:27 +01:00

21 lines
474 B
C#

using UnityEngine;
public class Rotating : MonoBehaviour
{
private float _rotationSpeed = 20f;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
var rotation = transform.rotation;
rotation *= Quaternion.Euler(0, _rotationSpeed * Time.deltaTime, 0);
transform.rotation = rotation;
}
}