Created
August 23, 2015 14:39
-
-
Save tanakaedu/91e8b7eda47398da410a to your computer and use it in GitHub Desktop.
Unityちゃんの右手用のコード
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class RightHand : MonoBehaviour { | |
private Transform transAnimatorRightHand = null; | |
// Use this for initialization | |
void Start () { | |
string path = "Character1_Reference" | |
+ "/Character1_Hips" | |
+ "/Character1_Spine" | |
+ "/Character1_Spine1" | |
+ "/Character1_Spine2" | |
+ "/Character1_RightShoulder" | |
+ "/Character1_RightArm" | |
+ "/Character1_RightForeArm" | |
+ "/Character1_RightHand" | |
; | |
transAnimatorRightHand = transform.parent.Find(path); | |
} | |
// Update is called once per frame | |
void Update () { | |
transform.position = transAnimatorRightHand.position; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment