|
@@ -147,13 +147,17 @@ public class BodySourceView : MonoBehaviour
|
|
|
Transform jointObj = bodyObject.transform.Find(jt.ToString());
|
|
|
jointObj.localPosition = GetVector3FromJoint(sourceJoint);
|
|
|
|
|
|
+ // Make head joint invisible (need to test)
|
|
|
+ jointObj.GetComponent<Renderer>().enabled = false;
|
|
|
+
|
|
|
+ // Make camera follow the head
|
|
|
if (jt == Kinect.JointType.Head)
|
|
|
{
|
|
|
cameraRig.localPosition = new Vector3(jointObj.localPosition.x, jointObj.localPosition.y - 1, jointObj.localPosition.z);
|
|
|
}
|
|
|
|
|
|
LineRenderer lr = jointObj.GetComponent<LineRenderer>();
|
|
|
- if (targetJoint.HasValue)
|
|
|
+ if (targetJoint.HasValue && targetJoint != body.Joints[_BoneMap[Kinect.JointType.Head]]) // (need to test)
|
|
|
{
|
|
|
lr.SetPosition(0, jointObj.localPosition);
|
|
|
lr.SetPosition(1, GetVector3FromJoint(targetJoint.Value));
|