RotateTransform.cs 464 B

123456789101112131415161718192021
  1. /// ProFlares - v1.08 - Copyright 2014-2015 All rights reserved - ProFlares.com
  2. using UnityEngine;
  3. using System.Collections;
  4. public class RotateTransform : MonoBehaviour {
  5. Transform thisTransform;
  6. public Vector3 Speed = new Vector3(0,20f,0);
  7. void Start () {
  8. thisTransform = transform;
  9. }
  10. void Update () {
  11. Quaternion offset = Quaternion.Euler(Speed * Time.deltaTime);
  12. thisTransform.localRotation = thisTransform.localRotation*offset;
  13. }
  14. }