Hey all,
I noticed this function (NewtonBallGetJointAngle) in the api, and I would like to do something exactly the same with my custom ball and socket joint. Would anyone care to show how to implement something like this?
Moderators: Sascha Willems, walaber
// the joint angle can be determine by getting the angle between any two non parallel vectors
dFloat angle;
dFloat sinAngle;
dFloat cosAngle;
sinAngle = (matrix0.m_up * matrix1.m_up) % matrix0.m_front;
cosAngle = matrix0.m_up % matrix1.m_up;
angle = m_curJointAngle.CalculateJointAngle (cosAngle, sinAngle);
Users browsing this forum: No registered users and 445 guests