PDA

View Full Version : pivot problems


tctrent
09-28-2008, 08:14 PM
hi, I having a problem with a mel script I'm writting or maybe i just don't understand how pivot points in maya work.

I have an object that is parented to a group node. in my script i make the pivot of the object macth the pivot of the parent, translate the object, and then return the pivot to its original position.

It works but the problem is that when i zero out the translations for the object it doesn't return to its origial position in world space. it will go back to the right postion in object space but not in the chanel box. it's like the transformations got frozen in a different location. does anybody know why this would happen.

I can post the script i used if that would help.

harmless
09-29-2008, 01:03 PM
it sounds like the pivot is not going back to the relative offset it was at previously. In case I am missing something, I would like to point out that moving the pivot around isn't affecting the translation (unless there is a step you haven't mentioned).

If you move the pivot, translate, move the pivot....that is the same as just translating (unless you are doing some sort of rotation before you translate, then rotate back)

tctrent
09-29-2008, 02:45 PM
well the script is for a rig i am working on. it is a script to match the ik leg to the fk leg. i have a reverse foot setup. in order to match the ik leg i have to move it from the ankle, but the pivot for the cntrol is at the base of the foot.

so i have the foot cntrol parented to group node. the pivot of the group node is at the ankle of the ik leg. what i want to do is temporarily move the pivot with out affecting the transfoms. translate and rotate the foot control to the postion of the fk ankle. then move the pivot back to the original position .

i am useing the xform command to query the position of the parent and to move the pivot of the foot control. i looked at the maya mel command docs under xform, but i don't know what flag to use: -rp, -piv, -rt, or -p.

thanks again for any replies.

Buexe
09-29-2008, 08:18 PM
working with pivots is tricky, especially since maya tries to be nice and balances stuff, so things don`t pop, but sometimes this is not the behaviour what one tries to achieve. Sorry, I can not be of more help regarding your specific problem, but I try to stay away from the xform command as much as I can especially when it comes to moving stuff that has rotation applied. Make sure you read the docs very carefully and understand what all attributes contribute to the transformation of a DAG transform, especially the rotatePivotTranslate attribute could be interesting in your case.

CGTalk Moderation
09-29-2008, 08:18 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.