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.
 
 
 

23 lines
511 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EnvironmentRotator : MonoBehaviour
{
[SerializeField]
private RotationController m_ship;
// Update is called once per frame
void Update()
{
if (m_ship != null)
transform.RotateAround(m_ship.Position, m_ship.RotationAxis, m_ship.EnvironmentRotationPeriod * Time.deltaTime);
}
private void Reset()
{
m_ship = FindObjectOfType<RotationController>();
}
}