diff options
| author | chai <chaifix@163.com> | 2021-04-21 21:52:56 +0800 |
|---|---|---|
| committer | chai <chaifix@163.com> | 2021-04-21 21:52:56 +0800 |
| commit | 6d0c9a214dc0fda264e8588fa02aaa19b0b2cc5f (patch) | |
| tree | 6a853a0b0cfb5818c864c3794cb58075876c07b0 /Assets/ProFlares/DemoScripts/CopyRotationValue.cs | |
+init
Diffstat (limited to 'Assets/ProFlares/DemoScripts/CopyRotationValue.cs')
| -rw-r--r-- | Assets/ProFlares/DemoScripts/CopyRotationValue.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Assets/ProFlares/DemoScripts/CopyRotationValue.cs b/Assets/ProFlares/DemoScripts/CopyRotationValue.cs new file mode 100644 index 0000000..f42b896 --- /dev/null +++ b/Assets/ProFlares/DemoScripts/CopyRotationValue.cs @@ -0,0 +1,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; + } + } +} |
