Browse Source

make body higher

Kenkart 2 years ago
parent
commit
00dd62de30
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Assets/KinectView/Scripts/BodySourceView.cs

+ 2 - 2
Assets/KinectView/Scripts/BodySourceView.cs

@@ -153,7 +153,7 @@ public class BodySourceView : MonoBehaviour
                 // Make head joint invisible
                 jointObj.GetComponent<Renderer>().enabled = false;
                 // Make camera follow the head
-                cameraRig.localPosition = new Vector3(jointObj.localPosition.x, jointObj.localPosition.y - 2, jointObj.localPosition.z + 2);
+                cameraRig.localPosition = new Vector3(jointObj.localPosition.x, jointObj.localPosition.y - 3, jointObj.localPosition.z + 2);
             }
 
             LineRenderer lr = jointObj.GetComponent<LineRenderer>();
@@ -223,7 +223,7 @@ public class BodySourceView : MonoBehaviour
 
     private static Vector3 GetVector3FromJoint(Kinect.Joint joint)
     {
-        return new Vector3(joint.Position.X * -10, joint.Position.Y * 10 + 10, joint.Position.Z * 10);
+        return new Vector3(joint.Position.X * -10, joint.Position.Y * 10 + 13.3f, joint.Position.Z * 10);
     }
 
     private Quaternion ConvertKinectOrientationToUnity(Kinect.Vector4 orientation)