Connect two animated objects with cylinder


#1

As the subject says, I’d like to connect two objects with a tube in between them. This tube will lengthen or shorten depending on the relative distance between the two objects. This sounds like a simple thing to do, but I’m having issues with it. I can easily constrain curve points to clusters, and point constrain the clusters to locators, which are parented to the objects. The tricky part is actually extruding geometry for the tube around said curve due to the fact the objects are offset from each other. Therefore when the distance between them changes, the line between the two changes in angle. As a result the tube deforms and flattens. This happens, of course, because the nurbs circle used to define the tube extrusion doesn’t rotate to always be properly facing the other end of the tube when the distance between the two objects changes. How can I make the circle curve dynamically face the other object regardless of angle or distance?? Or better yet, is there a simpler or more standard way to create the end result of a rigid but lengthening rope connecting two objects?

Thanks ahead of time!


#2

Aim constraints can work wonders in cases like this.
parent the curves to a locator that is positioned a good pivot point for your setup and aim constrain the locators to point at the opposite object.
They shouldn’t aim at the opposite curve because that might cause some craziness…put you could aim the parent locators at each other.
OR you could aim at a point in the middle of the two curves which could be kept in place by point constraining a locator to both of the objects you want it to be between. This could be good because you could setup a control to move this middle aim point to tweak this tube if you need to.
Hope this helps.


#3

Looks like using the aim constraint did the trick. I just put the constraint on the nurbs circle, set the UP to the correct axis, and made it point to the locator I already had parented to the opposite object. I feel silly that I couldn’t figure that out on my own, heh. Thank you very much!


#4

http://www.youtube.com/watch?v=7zEHDLLvOlw

This tutorial is great for doing something very similar to what you wanted, so if you find the time I recommend watching this to see how he sets up the aim constraints, etc. I know you solved your problem, but thought I’d share this anyways!


#5

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.