Calculate the angle between two edges using geometry nodes.
How can I calculate the angle between two edges using geometry nodes.
When I try and calculate it, it says 90 degrees (see red arrow which is not correct
) what am I missing?
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.
Sign up to join this communityYour second Sample Index
node samples an edge with index 1
— the second edge (0
being the first). But mesh line with 2 points only has 1 edge, so the output of this node is a null vector.
Changing the Sample Index
to 0
will fix the issue
I think Sergey Kritskiy has answered why your group isn't working, and adjusted accordingly.
If it helps, this is a group using the same method as yours, with a little more generality.
It takes the Arccosine of the dot-product of the normalized directions, and derives the sign of the angle from the alignment of their cross-product with 'Up'. The cross-product is 0-length at end-points, so 0° is returned for those.