Way to check if 2 attachments are in close proximity WITHOUT knowing the other attachment?

I’m currently creating a building system, but in order to make it work, I need to make a way of figuring out if 2 attachments are in a close enough proximity. I know what the first attachment is, but the second attachment can just be any attachment in general. Is there a way to figure out if the 2 attachments are close enough WITHOUT looping through every attachment in the entire game?

Does this help in any way?

1 Like