Hi all,
I’m working on a project that involves building a base and I am struggling with trying to check if the bases modules are all connected. I’ve managed to work out how to get the modules to “snap” to attachment points but this part is really racking my brain at the moment.
Base layout in unity is as follows (Screenshot Attached)
BaseHub (Nerve Center) > AttachmentPoint > “rest of module” > AttachmentPoint
Since the baseHub is going to have a fixed number of attachment points I’m testing if i can store a reference to the modules connected to the hub and the gameObject each attachment point connected to then using a raycast and seeing if it hits the same object but I can see errors potentially occuring if the ray is in a movable section etc along with I don’t know how big the Performance impact of continually sending out rays and checking this on each module would be.
My google-fu seems to be failling me recently so if anyone has any suggestions even just a pointer in the right direction would be appreciated.