1
$\begingroup$

I want to create an animation where one end of a spiral tube (existing object) is attached to a fixed point and the other end is attached to a moving object. How would I go about doing that in blender?

enter image description here

$\endgroup$
3

1 Answer 1

1
$\begingroup$

There are a few different issues here, and there are a few different solutions. The not-quite-spoken issue is that with a lot of ways of doing this, you're going to have undesirable deformation on the spring. Actually making it stretch to another point is trivial.

One way to solve this is to create your spring by running a long cylinder through a curve modifier. Why? Because it makes it easy to get good vertex weights on the spring. Disable the curve modifier on the spring, add two vertex groups ("base" and "spring") and assign all vertices to "base". Now switch to weight paint mode and draw a linear gradient for "spring" along the length of your cylinder. Finally, lock "spring" and normalize all.

Now you can re-enable the curve modifier and write it. You have a mesh that will deform properly with two bones. Create an armature containing two bones laid end to end along the axis of the spring (named "base" and "spring") and parent your spring mesh to this armature. Try moving (not scaling) "spring" along the length of the spring and notice your deformation.

Finally, you need appropriate relationships and constraints for your armature. Parent "spring" to "base" (unconnected.) Parent "base" or the entire armature to an appropriate object. Give "base" a damped track to your target object. Give "spring" a copy position from your target object. You're done.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .