mirror of
https://projects.caleb-brown.dev/UDRI-XRT/UDRIGEEKCup2024.git
synced 2025-01-22 23:28:28 -05:00
23 lines
652 B
C#
23 lines
652 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
|
|
// Rotates the cube in the template scene
|
|
public class SceneTemplate_RotateCube : MonoBehaviour
|
|
{
|
|
[Tooltip ("Changes the rotation speed of the cube")]
|
|
public float rotateSpeed = 1f;
|
|
|
|
[Tooltip("Changes orientation of the cube")]
|
|
public Vector3 objectRotation;
|
|
|
|
//Called every frame the app is running
|
|
// Note that "*" represents multiplication
|
|
void Update()
|
|
{
|
|
//Change the rotation (by the defined orientation * the time that has passed * defined speed)
|
|
transform.Rotate(objectRotation * Time.deltaTime * rotateSpeed);
|
|
}
|
|
}
|