summaryrefslogtreecommitdiff
path: root/Assets/ProFlares/DemoScripts/CopyRotationValue.cs
blob: f42b8968614dc3b5dc413562f1a730124165e57a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//// ProFlares - v1.08 - Copyright 2014-2015 All rights reserved - ProFlares.com


/// CopyRotationValue.cs
/// Copy the targets transforms rotational value.

using UnityEngine;
using System.Collections;

namespace ProFlares {
	public class CopyRotationValue : MonoBehaviour {
		public Transform target;
		
		Transform thisTrans;
		void Start () {
			thisTrans = transform;
			if(target == null)
				this.enabled = false;
		}
		
		void LateUpdate () {
			
			thisTrans.localRotation = target.rotation;
		}
	}
}