问题
I am trying to make my 3d humanoid model follow the movements i do in front of my kinect v2, i used this in my script and applied it to every part of my model(hands,legs,shoulders...) changing each time the TrackedJoint to the one that matches:
var tarx = body.JointOrientations[TrackedJoint].Orientation.X;
var tary = body.JointOrientations[TrackedJoint].Orientation.Y;
var tarz = body.JointOrientations[TrackedJoint].Orientation.Z;
var tarw = body.JointOrientations[TrackedJoint].Orientation.W;
gameObject.transform.rotation = Quaternion.Slerp(gameObject.transform.rotation, new Quaternion(tarx, tary, tarz, tarw), Time.time * 0.1f);
I do have some sort of results with the hand,leg movements(even if its still not it), but when it comes to the spine for example i get some weird results as you can see in this picture: result_image
来源:https://stackoverflow.com/questions/60175254/joint-rotation-using-unity-kinect-v2-sdk