CUI_rotation_anim.cs 564 B

12345678910111213141516171819202122
  1. using UnityEngine;
  2. using System.Collections;
  3. public class CUI_rotation_anim : MonoBehaviour {
  4. public Vector3 Rotation;
  5. // Use this for initialization
  6. void Start () {
  7. }
  8. // Update is called once per frame
  9. void Update () {
  10. this.transform.RotateAround(this.transform.position, this.transform.up, Rotation.y * Time.deltaTime);
  11. this.transform.RotateAround(this.transform.position, this.transform.right, Rotation.x * Time.deltaTime);
  12. this.transform.RotateAround(this.transform.position, this.transform.forward, Rotation.z * Time.deltaTime);
  13. }
  14. }