Hi
I am trying to make simulation of mechanical spring affecting on a body fixed by ball joint connection and forcing it to take vertical orientation with torque proportional to angles of deviation from global axes.
I use Open Dinamic Engine for simulation.
Orientation of a body defined with quaternion Q= (w,x,y,z). How can I found angles on wich body rotated to global axes?