Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to find parts adjacent to another?

Asked by
blowup999 659 Moderation Voter
5 years ago

I'm trying to do a version of A* Search Algorithm to pathfinding with a series of parts that create a path.

To find all the surrounding parts to one, I tried to do GetTouchingParts and GetConnectedParts, but neither of them work for parts that are adjacent.

How would I go about finding parts that are adjacently surrounding another part?

1 answer

Log in to vote
1
Answered by
Alphexus 498 Moderation Voter
5 years ago

Raycasting would work. By casting a ray from the center of the part to another part. Theres also region3, but I don't know about region3 because I never tried that finding parts using that. I don't know if it will work.

Ad

Answer this question