TestRotate.cs 386 B

12345678910111213141516171819
  1. using UnityEngine;
  2. using System.Collections;
  3. public class TestRotate : MonoBehaviour {
  4. public int speed = 0;
  5. // Use this for initialization
  6. void Start () {
  7. }
  8. // Update is called once per frame
  9. void Update () {
  10. //transform.Rotate(Vector3.right * Time.deltaTime*speed);
  11. transform.RotateAround(Vector3.zero, Vector3.right, speed * Time.deltaTime);
  12. }
  13. }