5
$\begingroup$

Simple question: I need a line between two previously made objects 'empty' so that it remains attached to these vertices: the line itself can't be moved, but moving the vertices modifies the line. Thanks!!

$\endgroup$

2 Answers 2

5
$\begingroup$

You can use vertex hooks, example: draw a line mesh (2 vertices).

Then in edit mode, select one vertex, press CTRL+H and select "hook to new object". Here an example for a cube mesh, easier to visualize: it works anyway.

enter image description here

A new "empty" will be created where the vertex is, and the vertex is "hooked" to it (meanwhile a "hook" modifier has been created, for your line mesh, with proper relations to empty object).

enter image description here

Do the same with the other vertex. Now you have the line mesh and two empties. Wherever you move the empties, their respective hooked vertex will follow.

enter image description here

You can also hook to existing objects (empties or others) or bones, choosing other options after CTRL+H. You may need to select them first.

In this case you'll probably have to move the control points to the respective empties origin while in edit mode to set their position:

enter image description here

$\endgroup$
4
  • $\begingroup$ Thanks!! But I have problems doing that with existing empty objects. In Object Mode, I select first the empty, then the line, then tab to Edit Mode... but CTRL+H gives three options (hook to new object, hook to selected object and hook to selected object bone), but no one works. How should I do it? $\endgroup$ May 29, 2016 at 11:07
  • $\begingroup$ you can check the hook in your objects modifers to fix it (the target object has to be the empty) or do the entire hook manually there. $\endgroup$
    – Bithur
    May 29, 2016 at 11:18
  • $\begingroup$ @m.ardito How can you snap to the empty? I see in your gif a little orange circle appearing, but I can't get it $\endgroup$ May 29, 2016 at 11:30
  • 1
    $\begingroup$ @jekyll-friend: if you select the empty, then the mesh, go in edit mode and select the vertex, press CTRL+H and select "hook to selected object", it will be hooked immediately, since the empty is the only other selected object. If the empty is not in the same vertex position, though, visually it seems that nothing happens, but it's hooked. Try to move the empty, the vertex will follow. To make the vertex reach a distant empty, you can use the mesh snap tools,as in the Carlo's gif. The circle you see there is a visual snap confirm of those tools. $\endgroup$
    – m.ardito
    May 29, 2016 at 11:49
2
$\begingroup$

You may do it using Stretch To bone constraint. enter image description here

Add a bone (Shift+A-->Armature-->Single Bone) between Empties. enter image description here

With a bone selected in Pose Mode go to Bone Constraints header-->Add Bone Constraint-->Stretch To enter image description here

Now being in Object Mode create a simple line consisted of two vertices (add a plane and delete two vertices). Place it exactly between Empties. Name it viz. enter image description here

Select the bone again in Pose Mode, go to Bone header and type viz below Custom Shape in the Display panel. It'll change the bone appearance to the line you've created. Next go to Stretch To constraint settings and adjust the Rest Lenght value to make the line fit between Empties. enter image description here

Lastly you may parent (Ctrl+P) the bone and second Empty to the first Empty to make them move together.

$\endgroup$

You must log in to answer this question.

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