SpinPlanet.cs 289 B

123456789101112
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. // Rotate planet around y-axis with speed.
  5. public class SpinPlanet : MonoBehaviour {
  6. public float speed = 4;
  7. void Update () {
  8. transform.Rotate(Vector3.up, speed * Time.deltaTime);
  9. }
  10. }