|
@@ -288,8 +288,17 @@ public class BodySourceView : MonoBehaviour
|
|
|
|
|
|
private static Vector3 GetVector3FromJoint(Kinect.Joint joint)
|
|
|
{
|
|
|
- // TODO: modify to make joints more accurate
|
|
|
//return new Vector3(joint.Position.X * -10, joint.Position.Y * 10, joint.Position.Z * 10);
|
|
|
+
|
|
|
+ // TODO: change offset to be more realistic
|
|
|
+ if (joint.JointType == Kinect.JointType.ShoulderLeft)
|
|
|
+ {
|
|
|
+ return new Vector3(joint.Position.X * -1 + 0.1f, joint.Position.Y * 1, joint.Position.Z * 1);
|
|
|
+ } else if (joint.JointType == Kinect.JointType.ShoulderRight)
|
|
|
+ {
|
|
|
+ return new Vector3(joint.Position.X * -1 - 0.1f, joint.Position.Y * 1, joint.Position.Z * 1);
|
|
|
+ }
|
|
|
+
|
|
|
return new Vector3(joint.Position.X * -1, joint.Position.Y * 1, joint.Position.Z * 1);
|
|
|
}
|
|
|
|