Trying to detect any collidable parts within a certain range of one part

What is the best way to detect any of these nodes are within a certain distance of an obstacle (the semi-transparent parts in this case)?

I’ve tried GetPartBoundsInBox, GetPartsInPart (see pictures), and GetTouchingParts and they all have similar results. They either don’t detect all of the parts in the obstacles, don’t work with thin obstacles or don’t detect any parts at all…

FYI - this is for a node generation script for a custom pathfinding module i’m creating.


In this example, some nodes detected the obstacle then it randomly stopped working:

Any advice would be appreciated.

Use raycasting instead of volume detection it’s more precise and can work well with thin obstacles another tip would be well cast rays in multiple directions for each node cast yays in serval direction up down left right and check for nearby obstacles

As for it suddenly not working, the best answer I can give is to ensure that it is all loaded in correctly before running the code for detecting such.

If you could send a demo, it’d be way easier to help!