CopyRotationValue.cs 511 B

1234567891011121314151617181920212223242526
  1. //// ProFlares - v1.08 - Copyright 2014-2015 All rights reserved - ProFlares.com
  2. /// CopyRotationValue.cs
  3. /// Copy the targets transforms rotational value.
  4. using UnityEngine;
  5. using System.Collections;
  6. namespace ProFlares {
  7. public class CopyRotationValue : MonoBehaviour {
  8. public Transform target;
  9. Transform thisTrans;
  10. void Start () {
  11. thisTrans = transform;
  12. if(target == null)
  13. this.enabled = false;
  14. }
  15. void LateUpdate () {
  16. thisTrans.localRotation = target.rotation;
  17. }
  18. }
  19. }