can you get the limb's direction? if so, then maybe i could help..
first off, i don't know how euler angles work, but i can extract the x/y (possibly z, but not sure i can do it without some additional info) around their axes from that direction
so here's how you extract the angle around the X axis and the angle around the Y axis from a direction
float hxObject::GetAngleX ( void )
{
D3DXVECTOR3 xVec ( 0.0f, 0.0f, 1.0f );
D3DXVECTOR3 _2dLook ( 0.0f, _look.y, _look.z );
float dot = D3DXVec3Dot ( &xVec, &_2dLook );
float u = 1.0f;
float v = sqrt ( float ( _2dLook.x*_2dLook.x + _2dLook.y*_2dLook.y + _2dLook.z*_2dLook.z ) );
float result = acos ( float ( dot / (u*v) ) );
if ( _look.y > 0.0f )
result = -result;
return D3DXToDegree ( result );
}
float hxObject::GetAngleY ( void )
{
D3DXVECTOR3 yVec ( 0.0f, 0.0f, 1.0f );
D3DXVECTOR3 _2dLook ( _look.x, 0.0f, _look.z );
float dot = D3DXVec3Dot ( &yVec, &_2dLook );
float u = 1.0f;
float v = sqrt ( float ( _2dLook.x*_2dLook.x + _2dLook.y*_2dLook.y + _2dLook.z*_2dLook.z ) );
float result = acos ( float ( dot / (u*v) ) );
if ( _look.x < 0.0f )
result = -result;
return D3DXToDegree ( result );
}
this is copied directly from my engine's code, once again, this might NOT be euler angles as i dont know how they work, those are the angles around the axes.
So yes, the variable look is a D3DXVECTOR3, which is the direction in your case, so you can set it to
D3DXVECTOR3 look ( limbDirectionX, limbDirectionY, limbDirectionZ );
now that you have the angles, you can do what i said in my previous post,
dbRotateLimb ( -GetAngleX ( ) + dbCameraAngleX ( ), -GetAngleY + dbCameraAngleY ( ), 0 );
also note that the above functions are not 100% accurate, for example, if the angle is 50 around one axis, it might return 49.79 or something
hope it helps