PDA

View Full Version : Key the pivot


bombadillo
01-18-2005, 09:35 AM
Hi everybody. I dunno if this is the right place to post but i'll try.

I'm looking for a way to key the pivot position during an animation.
i didn't find any simple command that does (there's only some rotate pivot), so i'm wondering if i can accomplish this task via script.

Every help is appreciated.

Thanks in advance

swardson
01-19-2005, 11:12 PM
well, this is a good question

If you used the animation of 1 object to position the pivot point of another each frame it might work.

in a runtime expression write

float $piv[] = `xform -q -t -ws pCube1`;
move -ws $piv[0] $piv[1] $piv[2] pCube2.scalePivot pCube2.rotatePivot;

obviously pCube1 would be the object you want to control the pivot point, and pCube 2 is the object thats pivot point is being controlled. Just animate the first object and voila your pivot point is animated :)

hope this helps.

-Brad

swardson
01-21-2005, 02:45 AM
just out of curiousity, what kind of animation did you need to animate the pivot point for. After I figured out how you could do it, I couldnt think of an application for it. Just curious

Thanks

Brad

Zac256
01-26-2005, 05:49 PM
If you select the object and go to the channel editor there should be a menu called Channels. Go to channels->Channel Control. There will be two sides to the channel control. One for non-keyable things and one for keyable. Move the pivot information to the keyable side and you can key it directly from the channel box with no need for mel, or a runtime expression.musicraker: It would be a timesaver in animating a box rotating "walking" down a plane, for instance. Use stepped keys on the pivot for each rotation, moving the pivot to the new corner touching the ground.

bananamation
01-27-2005, 09:39 AM
ghaaa, sometimes things are easier then you think...

just out of curiousity, what kind of animation did you need to animate the pivot point for. After I figured out how you could do it, I couldnt think of an application for it. Just curious

I know one also...if tou have a character that needs to do an acrobatic move in the air, then its nice to be able to change the center of rotation, normally itīs in the hips of the character, but when turning in the air it might be somewhere else. Then itīs nice to be able to change the pivot.

...here iīve been trying using MEL when all I needed to do was go into the channel control...thanks Zac256

CGTalk Moderation
01-27-2006, 10:00 AM
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.