Files
OnlyNPC/Assets/FPS/Scripts/Game/ConstantRotation.cs

15 lines
355 B
C#
Raw Permalink Normal View History

2026-05-26 09:46:57 +07:00
using UnityEngine;
namespace Unity.FPS.Game
{
public class ConstantRotation : MonoBehaviour
{
[Tooltip("Rotation angle per second")] public float RotatingSpeed = 360f;
void Update()
{
// Handle rotating
transform.Rotate(Vector3.up, RotatingSpeed * Time.deltaTime, Space.Self);
}
}
}