none
how to calculate the whole body's rotation angle,use what joints RRS feed

  • Question

  • 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?

    Monday, December 5, 2011 6:26 AM

All replies

  • Hi Justin!

    Try to calculate the rotation angle just using shoulders information.


    You should find a vector with 0 degrees between shoulders ( vec_0_shoulders ), that's set by a vector defined from one shoulder ( left ) to the other ( right ) but this other one with same Z value as left one.So this will be the zero degree vector between shoulders.

    Then the angle calculation will have sense because "real" (from left to right vector shoulder) and "vec_0_shoulders" vectors are in touch and are defining a right coordinate system to find such angle.

    hope this help
    • Proposed as answer by ykbharat Tuesday, April 24, 2012 11:55 AM
    Sunday, December 11, 2011 11:32 AM