- Home /
Question by
lbrtrzgrc · Sep 28, 2018 at 07:43 AM ·
scripting problemkinectavatar
My avatar doesn't follow correctly my movements with Kinect quaternions
Hi,
I am doing a project which consists on animating an avatar in real-time through the Kinect V2. However, it doesn't follow my movements as desired.
First, I acces the Kinect body joints orientations like the example below:
var orientation1 = Body.JointOrientations[JointType.Head].Orientation;
Then I want to apply them to my avatar and I use on the Update function:
public Transform[] articulacions;
UnityEngine.Quaternion or1_unity;
// NECK
or1_unity.x = orientation1.X;
or1_unity.y = orientation1.Y;
or1_unity.z = orientation1.Z;
or1_unity.w = orientation1.W;
articulacions[0].rotation = or1_unity;
Being "articulacions" a function of transform of the Joint GameObjects of the avatar and rotation, I think, allows be to work with global coords.
At this point, I don't know why it doesn't move like me and it seems quite more than a simple coordinate system problem. Maybe It doesn't work with global coords or I am doing something wrong
Thanks in advance!
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612175419im_/https://answers.unity.com/themes/thub/images/avi.jpg)