Joint rotation using Unity Kinect v2 SDK

一个人想着一个人 提交于 2021-01-29 19:53:52

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!