Jump to content

Axis parameter from a bone's direction


Recommended Posts

in which context? (python?,hscript?, VOPs?, CHOPs?)

but the idea is the same, just multiply desired axis with bone's global rotation matrix or inverted transposed global transform matrix

for python it would be something like

bone = hou.node("/obj/chain_bone1")
axis = hou.Vector3( (0,0,-1) )
boneDir = axis*bone.worldTransform().inverted().transposed()

above example can be easily done in hscript or VOP/VEX too

or just parent null to the bone, move tz to -1, then difference of null's and bone's global position is your direction vector

Link to comment
Share on other sites

Thanks Tomas,

sorry for not beeing clear about the context. By the way, my intent was to do it with expressions,

but python seems to be much better suited for this.

The parenting idea is also very nice. Thanks for that too.

Mate

Edited by beeemtee
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...