Determining point collision
When the normal and the vector V point in the same direction, the dot product returns 1. If the two vectors are perpendicular, the result is 0. (source)
And when the vectors face away from each other, the dot product is less than 0. We can use this fact to determine if a point in space is colliding(inside) a surface.
Node setup
You need a NURBS surface and a world position(P).
I've connected the dot product to a condition
node to visualize it. (zoom)
-
Connect P (world position) to a
closestPointOnSurface
node. Connect this topointOnSurfaceInfo
which contains Q (pointOnSurfaceInfo.position
) and N (pointOnSurfaceInfo.normal
). -
Subtract Q from P using a
plusMinusAverage
insubtract
mode to get vector V, which points from the surface towards the world position. -
dotProduct
V with N. If the result is less than 0, the point is colliding inside the surface.