using UnityEngine; using System.Collections; using System.Collections.Generic; using Kinect = Windows.Kinect; public class DrawBones{ public static GameObject CreateObj(PrimitiveType Ptype,Kinect.JointType jointType, SkeletonData.JointData joint,Transform parent) { GameObject jointObj = GameObject.CreatePrimitive(Ptype); jointObj.transform.localScale = new Vector3(0.03f, 0.03f, 0.03f); jointObj.name = jointType.ToString(); jointObj.transform.localPosition = joint.position; jointObj.transform.localRotation = joint.rotation; jointObj.transform.parent = parent; if (jointObj.GetComponent() != null) jointObj.GetComponent().enabled = false; return jointObj; } }