I am trying to make a laser beam (glowing cylinder) that stretches to a target empty. My problem is that the stretch to constraint stretches in my local Y-Axis instead of my local Z-Axis (how i need it). How can i tell the constraint to use this axis?
2 Answers
Yeah, the stretch-to constraint doesn't let you pick.
There are two solutions here. The easier is to change your mesh so that its local Y axis is what you want to change. Select the object and snap the cursor to its location. Open it up in edit mode and change the pivot point to the cursor. Select all and 'r' 'x' '-90' to rotate it. Now what was your local Z axis is your local Y axis.
The other way to do this is to use a driver to control the scale, and constraints only to "clean up" afterwards. Drive the scale of the object using the distance between self and target object. Then you can add a damped track constraint in any axis you want, and possibly a preserve volume constraint to alter the scale in other axes.
- 24,535
- 1
- 22
- 68
Select the mesh, ctrl-a apply rotation. In Constraints tab change the "To:" setting in the Track-To constraint to "Y". Change the "Up:" setting to "Z". If you want the effect to apply only from the position of the cylinder you will need to move the origin to the end furthest from the target: In edit mode alt-r/click the vertices on the base; shift-s, cursor to selected; in object mode from tools panel set origin to cursor.
- 603
- 4
- 11
