Skip to content

Instantly share code, notes, and snippets.

@tanakaedu
Created August 23, 2015 14:39
Show Gist options
  • Save tanakaedu/91e8b7eda47398da410a to your computer and use it in GitHub Desktop.
Save tanakaedu/91e8b7eda47398da410a to your computer and use it in GitHub Desktop.
Unityちゃんの右手用のコード
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