i can calculate the rotations of hands,legs and neck very well ,but where i use left hip and right hip to calculate the whole body's rotation ,the result is not not good.

transform skeleton coordinates to the player space coordinates,then

vector3 v = lefthip - righthip

vector3 vRefer(1,0,0)

vRefer --rot-->v

the result rot is not good ,i output v find out that the y and z component of v are not zeros ,that's the problem,then how can i get the whole body's rotation?