Kastell/Assets/Pixel3D/Scripts/Rotator.cs
Gerard Gascón f5c1616018 init
2025-02-02 23:45:04 +01:00

17 lines
440 B
C#

using UnityEngine;
public class Rotator : MonoBehaviour
{
[SerializeField] float _speedX = 50f;
[SerializeField] float _speedY = 50f;
[SerializeField] float _speedZ = 50f;
void Update()
{
var rotationX = _speedX * Time.deltaTime;
var rotationY = _speedY * Time.deltaTime;
var rotationZ = _speedZ * Time.deltaTime;
transform.Rotate(rotationX, rotationY, rotationZ, Space.Self);
}
}