I have a EulerAngle of Vector3(0,20,0) that represents a limit on a bone rotation.
I want to compare this limit with the actual rotation of a bone. Is there a way to convert Vector3(0,20,0) into a Quaternion with the same axis as the bone Y axis and then compare the angles?
If so how would I do that for the X and Z axis?
Sounds like you maybe want to compare the localRotation, or localEulerAngles of the child-bone to that of the parent bone yes?
You could also look into using a combination of http://unity3d.com/support/documentation/ScriptReference/Transform.TransformDirection.html and http://unity3d.com/support/documentation/ScriptReference/Transform.InverseTransformDirection.html to transform both bones to world space then back into the local space of the parent bone ?
answered Mar 09 '12 at 09:14 PM