Atom Posted July 31, 2016 Share Posted July 31, 2016 (edited) Hi All, I have a bone located at world origin. I also have a direction(i.e. vector) and a length. So I want the bone to point along the direction. To do this I need to populate the Rotation fields of the bone. How do I take the direction and length and produce 3 rotation values in degrees that I can supply to the bone? Example data from Acclaim .asf file. direction 0.611804 -0.747784 0.257906 length 2.29243 Edited July 31, 2016 by Atom Quote Link to comment Share on other sites More sharing options...
animatrix Posted July 31, 2016 Share Posted July 31, 2016 If your length represents the amount of rotation around that axis, you can use quaternion(angle, axis). Then qconvert to convert it into matrix3 and then cracktransform to extract the rotation out of this matrix3. Quote Link to comment Share on other sites More sharing options...
MrScienceOfficer Posted August 1, 2016 Share Posted August 1, 2016 Assuming you're using python it's quite simple, bone = hou.Vector3(0,0,-1) #Bones in Houdini are oriented down the -Z axis by default vector = hou.Vector3(your normalized vector here) rotation = bone.matrixToRotateTo(vector) eulerAngles = bone.extractRotates() Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.