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

Is there a better way of checking for parts in a region than Region3?

Asked by 7 years ago

Like Region3s but at angles.

0
If you can describe the specific situation in which you want to perform this calculation, we might be able to suggest some alternatives. duckwit 1404 — 7y
0
Something like, say, getting parts which are a certain distance away from a given part. I'm just thinking that there's got to be a better way than iterating over every single part in workspace. NotInventedHere 158 — 7y

1 answer

Log in to vote
0
Answered by
cabbler 1942 Moderation Voter
7 years ago

There is no solid API for angular regions. One thing you can do is create an invisible part with the desired size and cframe, then use Part:GetTouchingParts(). This only works if the part is cancollide true, and only returns cancollide true parts. So it has problems. Besides this, you would have to do some hard math yourself.

Ad

Answer this question