View Full Version : Querying the major axis of a joint
lilacpalms 09-18-2009, 12:09 PM Hi There
Would anyone know the most effective way of querying what the major axis of a joints local rotation axis is? For example if a joint is oriented so that Y is pointing down the chain, how do you find Y??
Thanks in advance
|
|
EightBit
09-19-2009, 03:37 AM
As far as I know, there isn't an easy way to do that.
Maybe you could grab the worldspace location of the joint and the ws location of its child, do some trig to figure out the orientation of the joint in space, then compare those results to the joint orientation attribute and figure out which axis is pointing down the joint. But I'm not sure if the would work and I don't know the necessary trig to try it.
uiron
09-20-2009, 09:10 PM
in general, you can't.
if joint chain is in the "initial" pose, so that joint1 points down to it's child joint2 , then just read joint2 translate values and pick the one which is biggest (or non-zero). e.g., if orientation was Y as down the chain, joint2.translate is probably [0, 10.0, 0] (or some other value instead of 10.0 )
CGTalk Moderation
09-20-2009, 09:10 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.