5
$\begingroup$

I am trying to find the nearest edge from the center of the face of a plane. So a UV sphere is instantiated on the face and the following node setup tries to find the nearest edge position and move the sphere there. I understand this setup doesn't indicate with respect to what we are trying to find the nearest edge. But not sure where and how to include that even after going through the blender documentation. There could also be other problems with this as I haven't fully grasped the concept. Any help will be appreciated.

enter image description here

$\endgroup$

1 Answer 1

6
$\begingroup$

The node Index of Nearest usually returns the index of the nearest element from the same domain.

But since you want to get the nearest element from the edge domain, it would be easier to use the Sample Nearest node instead.

This node allows you to select the domain directly. You would then only have to capture the index obtained in this way and process it according to your wishes.

Something like this:

In this example, I simply convert the face into a point and move it to the nearest edge.

$\endgroup$
1
  • $\begingroup$ I was put off by the sentence "If you want to find nearest to each point in same geometry, its better to use the Index of Nearest node." from the documentation of Sample Nearest. So actually this applies to geometry as well as domain: "...to each point in same geometry and in same domain..." $\endgroup$ Commented Sep 9, 2024 at 13:11

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.