RotationScript.cs 328 B

1234567891011121314
  1. using UnityEngine;
  2. using System.Collections;
  3. public class RotationScript : MonoBehaviour {
  4. public float speed;
  5. void Update()
  6. {
  7. // Rotate the object around its local Y axis at 1 degree per second
  8. transform.Rotate(Vector3.up * speed * Time.deltaTime);
  9. transform.Rotate(Vector3.left * speed * Time.deltaTime);
  10. }
  11. }