Assignment for RMIT Mixed Reality in 2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

24 lines
576 B

namespace VRTK.Examples
{
using UnityEngine;
public class AutoRotation : MonoBehaviour
{
[Tooltip("Angular velocity in degrees per seconds")]
public float degPerSec = 60.0f;
[Tooltip("Rotation axis")]
public Vector3 rotAxis = Vector3.up;
// Use this for initialization
private void Start()
{
rotAxis.Normalize();
}
// Update is called once per frame
private void Update()
{
transform.Rotate(rotAxis, degPerSec * Time.deltaTime);
}
}
}