CapersProject/Assets/AllIn1VfxToolkit/Demo & Assets/Demo/Scripts/AllIn1AutoRotate.cs

15 lines
398 B
C#
Raw Normal View History

2025-02-10 05:47:48 +00:00
using UnityEngine;
namespace AllIn1VfxToolkit.Demo.Scripts
{
public class AllIn1AutoRotate : MonoBehaviour
{
[SerializeField] private float rotationSpeed = 30f;
[SerializeField] private Vector3 rotationAxis = Vector3.up;
private void Update()
{
transform.Rotate(rotationAxis * (rotationSpeed * Time.deltaTime), Space.Self);
}
}
}