View Full Version : Comparing object rotations?
04 April 2009, 08:18 PM
Okay, I have a problem. I want to be able to compare the difference in rotation between an object and its parent, and use that difference as a script controller for a different object with ITS parent. To make things more complicated, the first object being checked is using a lookat constraint.
To illustrate (and this should not be a hard one to set up for anyone that wants a crack at it):
I want Box 4 to stay at the same relative rotation to it's parent, Box 3, as Box 2 is to its own parent, Box 1. I have spent several hours trying to figure this out, and my results have not been at all satisfactory. Please help!
04 April 2009, 12:38 AM
Just use an expose transform helper and wire to the exposed values. Does that get what you need?
04 April 2009, 02:58 AM
It certainly appears to, thank you!
... Why have I never heard of the Expose Transform helper before now???
04 April 2009, 12:50 PM
Got me, I wrote the white paper for AD years ago on it and it was added in Max 8 I think. I have been using it ever since.
04 April 2009, 01:47 PM
I didn't know this existed either... What are the applications of it? I'm assuming it's best uses are in rigging?
04 April 2009, 02:07 PM
There are many cases where you can't just wire up to the position or rotation of an object. For instance if an orientation constraint is controlling the track there is no track to wire to to get the local X rotation value. So you use the Expose TM helper to get those values. I use it in all rigs on just about all joints that I'm getting values from, This way I am not tied to any given controller in a list either.
04 April 2009, 02:16 PM
I use it in all rigs on just about all joints that I'm getting values from, This way I am not tied to any given controller in a list either.
What's the advantage of this? At first sight this just looks like more work, at least to me.
04 April 2009, 02:28 PM
Huge advantages. First you can't get the rotations from a joint being controlled with an orientation constraint unless you use a script controller and do the math your self. Two it is faster then using a script controller in both setup and speed of calculation. Third I don't have to wire to just a single controller in a list of controllers I can wire to the final output of the controller list allowing me to use animation layers on objects that are driving others.
04 April 2009, 02:52 PM
Two it is faster then using a script controller in both setup and speed of calculation.
Faster - the magic word.
Thanks for explaining.
04 April 2009, 02:52 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.