I’m looking for a way to take note of which Parts are in the surrounding area of the door.
As shown in the image below, I’m looking to keep note of what is:
Behind
Left
Right
of the Door. Ignoring anything in front.
What are some ways I can do this? I was thinking I could use RayCast along the RightVector and Inverse LookVector to take note of parts around it? But not sure how effective that’d be.
You could use raycasting but I suggest against that. If you were casting from, say the left right and front of the door you’d only be able to cast in a line unless you scripted a function that casted multiple times from the center to the desired destination.
I’d suggest using region3 if you wanted to do this. It basically takes 2 sets of Vector3 values and creates a box from them, logging everything inside into a table. Region3 (roblox.com)
Pretty much. To take it one step further you could take note of the position of the door and the position of objects inside the R3 and then deduce which direction it is from the door, choosing whether or not to ignore it.
What’s the use case? If you can get away with instead checking a select few parts that may be relevant then that’s almost certainly going to be easier/more robust/faster.