Work continues on my ship editor. Tonight I finally decided to roll up my sleeves and sort out the logic for being able to detect when parts are no longer attached to the center of the ship. Here you can see how this works (ignore the strange issues with the selection boxes not updating correctly, it works but the gif capture messed it up):
I had originally thought about using A* to detect if each part could draw a connection back to the center but that ended up being a total mess. The way I do it now is that each part has an array of parts it’s connected to. You can call Connected() on a part and it will loop through it’s neighbors and flag that they are connected. This ends up being recursive and when it’s done I simply loop through all the parts and if they are no longer connected I change their material’s color to red.
Now I can start working on the part inventory to handle creating different ship parts as well as where parts go when you delete them.