Maya Animation and Rigging
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya animation topics.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to restrict a cylinder's ends to two different objects?

Message 1 of 4
505 Views, 3 Replies

how to restrict a cylinder's ends to two different objects?

I have tried constraint parent but it didn't work or maybe i missed something but the only way i can do this is by manually animating it but i want to rig it and a control for it. i haven't tried Ik handle but just wondering if there's an easier way to do this. Thank you


Labels (1)
Message 2 of 4
in reply to: Anonymous

What you should do is:

Create a bone segment with a joint at the top of the cylinder and one at the bottom.

Use a parentConstraint to attach the joint at the top to the door of the cars trunk, but only have the constraint drive the translate channels, not the rotate channels. So it will follow the door positionally but will keep it's original orientation.

Then create a locator and attach it to the point you want the other end of the cylinder to be attached to.

Then use an aimConstraint to aim the joint at the top at the locator (don't forget about worldUp settings).

The you can attach the cylinder to the bone segment with a constraint or with skinning. 


If you need it to stretch you'll need to do some extra stuff to measure the distance between the two points you want it to stretch between and apply that stretch value to the bone.

Message 3 of 4
in reply to: Anonymous

There's an easier way than dealing with aim constraints and up vectors.  Use a single chain ik handle.  Parent the ik handle to the moving point on the tail gate.  You'll probably need to stretch the strut.  So place locators at the start and end of the joint.  Parent the lower one to the moving point on the tail gate.  Parent the top to the wing.  Also parent the joint to the wing.  Connect a distanceBetween node to the locators' world positions to get the distance.  Now connect the distance to a multiplyDivide node's input1X.  Copy the distance value to input2X and set the operation to "divide".  Now connect the outputX to the longitudinal axis of the joint.  Of course, all this should be setup at the default position so all the values are correct.  Default meaning when the wing is down and the strut is connected to the tail gate.

Message 4 of 4
in reply to: mcw0

While a single chain ikHandle may be easier to set up for someone who hasn't use an aimConstraint, they are slower. It won't make any noticeable difference in this situation but it's good to keep in mind.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators

Autodesk Design & Make Report