2
$\begingroup$

I have created 2 empties. Using geometry nodes on another single vertex object, I created a mesh line joining these empties. When i try to instance a cone on this mesh line, i am unable to align it to the tangent.

Instance of pyramid on a mesh line

But i am able to align it if I use a curve line instead of a mesh line.

Is it possible to do it using the mesh line instead of the curve line?

$\endgroup$
2
  • $\begingroup$ Yes, you can use the Node Edge Vertices and calculate the direction vector between the points. You can then convert this direction vector into a rotation using Align Euler to Vector. However, I would still use a curve if possible. $\endgroup$
    – quellenform
    Oct 2, 2022 at 8:32
  • $\begingroup$ @quellenform can you please elaborate the Blender Geometry Nodes method of "calculate the direction vector between the points"? I saw lot of complicated trigonometry over the internet, but could not translate it into Blender Geometry Nodes $\endgroup$
    – R M K
    Oct 2, 2022 at 9:54

1 Answer 1

4
$\begingroup$

Basically, you just have to calculate the direction vector between the points with the vector math node Substract, and convert it to a rotation with the node Align Euler to Vector.

You have two possibilities:

Either you use the node Edge Vertices and calculate the vector between each point:

enter image description here

Or you use directly the Location of the Empties:

enter image description here


(Blender 3.1+)

$\endgroup$

You must log in to answer this question.

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