I am working with Blender 3.6.4.
I seek to have points inside a concave object be taken to its surface. I have set up the node tree in the photo, which does the following: the input geometry at the left is a point cloud surrounding the object "Sphere". I set the position of those points based on a "Switch" node, which would hopefully evaluate as "False" for points not inside the sphere and "True" for points inside it. Right now, the "Switch" entry is effectively void; I have tried some solutions I will discuss later, but they didn't work.
If "False", then the Switch simply repeats the point's position. If "True", then gives the closest position on the sphere (outputted from Geometry Proximity).
The "False" and "True" inputs are working as expected; I just can't have the "Switch" correctly select which points should move and which should stay in place. If all selected are true/false, the following results are obtained:
(False)
(True)
What I was trying to do is, I was trying to check whether the vector going from the closest position on the sphere to the point's position goes roughly in the same direction as the normal at that point of the sphere by checking the sign of their dot product. Hence, a positive dot product signals the point is outside the object, because the normal at the closest position of the sphere would point at it (roughly).
The problem is: I don't know how to retrieve the normal at the closest position on the sphere. The closest node I know for that would be "Evaluate at Index", but I don't have the index, only the position. I have tried different combinations of nodes, but they didn't work.










