You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
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<BoxCollider>() != null)
|
|
|
|
|
|
jointObj.GetComponent<BoxCollider>().enabled = false;
|
|
|
|
|
|
return jointObj;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|