i have a general issue.i want to get the intersections of two element types.for example: doors and rooms. lets assume i have 4 (A,B,C,D) doors and 2 rooms (R1,R2) and A and B are intersecting with R1 and C,D are intersecting in R2.i need to that R2 is spesificly intersecting with C and D.what is the way of taking these lists?
So, your issue is quite specific, and has specific issues.
I will try to help you with the specific issue you have raised, and perhaps we can generalise afterwards?
Apologies, I’ve made quite a long graph to show lots of things you might find useful.
So for a door, it’s containment is a bit unusual, because it is rarely ‘inside’ a room, so it is not often going to intersect. (note the falses on IsInsideRoom)
However it does have a room location point, so the easiest way is to use that with help from Clockwork.
Otherwise, more generally, we need to expand the room boundary to enclose the location points. I’ve made polycurves first, so they offset as a closed curve, I’ve used points as they tend to be the most robust way of making these shapes. Then I’ve made a polygon so I can use the polygon intersect method, you could make a solid if you had 3D locations within the room.
Finally I’ve got the index of the true intersections and grabbed those from the original points list.