# Select the vertex of a path closest to another object with geometry nodes

So, let's say I have a straight path with 5 vertices and a sphere in my scene. What I want to do is to animate the position of my sphere and, through geometry nodes, select the closest vertex of the path to the sphere. Would that be possible ?

My complete idea and project is to have a 3D grid which scales proportionally to an object's location, with the scaling being local to the vertex. I'm basically trying to have a working model of this animation: https://youtu.be/DYq774z4dws?t=265

I don't have much experience in geometry nodes, so my request may be impossible or hard to do, but I'm willing to put in the work to understand that :)) (I'm a student in physics, so if any maths explanations are required for me to understand, I should be fine)

Thank you !!

• i think you could easily achieve this by using geometry proximity node Commented Sep 25, 2022 at 4:51

• @aidegare No problem! The Mix is a linear interpolation between the point's own position (Fac == 0) and the position of the target (Fac ==1). Fac is determined by some function of the distance between the undeformed point and the target. In this illustration, Fac is set to 1/( point->target distance) squared, put through a smoothing function in Map Range . It was determined purely aesthetically, and as an imitation of your reference, not as any attempt to represent genuine GR curvature ( which would have had to include the t of txyz spacetime anyway .. 8-\ .. ) Commented Oct 8, 2022 at 21:09