0
$\begingroup$

I want to instance cylinders on the edges of a circle and line the cylinders up with the edges like so figure 1

I am currently just instancing the cylinders on the edges of the circle but I am unable to align them. I have tried doing goofy stuff with the normals, instancing a curve on the edges, and instancing on points but I just cannot get these cylinders to align parallel to the mesh.

$\endgroup$

1 Answer 1

2
$\begingroup$

Nevermind, I misread the question. In order to align to an edge, you need to find out the vector of that edge. You can do that by taking the position of each of its vertices and subtracting one from the other.

Align instances to edges

NB : it looks good because it's a cylinder and it's symmetrical on all 3 axes, but if you change it to a shape that's not (such as a Suzanne), you will find that it doesn't necessarily orient itself with respect to what you perceive to be the normal of the underlying shape (the circle). For this you'd need to capture the normal of the circle as well (change the fill type to ngon for this to work) and use another align euler to vector node on top of this.

Align instances to edges and normals

$\endgroup$

You must log in to answer this question.

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