|
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? Thanks, Dan
(comments are locked)
|
|
You mean http://unity3d.com/support/documentation/ScriptReference/Quaternion-eulerAngles.html ? or http://unity3d.com/support/documentation/ScriptReference/Quaternion.Euler.html or http://unity3d.com/support/documentation/ScriptReference/Quaternion.ToAngleAxis.html ? 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 ?
(comments are locked)
|
