Looking-Glass/Assets/VRTemplateAssets/Scripts/Rotator.cs

19 lines
399 B
C#
Raw Normal View History

2024-02-02 12:54:47 +01:00
using UnityEngine;
namespace Unity.VRTemplate
{
/// <summary>
/// Rotates this object at a user defined speed
/// </summary>
public class Rotator : MonoBehaviour
{
[SerializeField, Tooltip("Angular velocity in degrees per second")]
Vector3 m_Velocity;
void Update()
{
transform.Rotate(m_Velocity * Time.deltaTime);
}
}
}