Best concept of Modular Space Ship that is assembled in runtime by player?

I need “Block connection map”. But structure will not be hierarchical because one block can be connected to many, so it is not “who parent to who” but rather “who connected with who”

While you cannot dynamically create sockets in BPs, you can give meshes sockets manually and grant them unique tags:

Your component can keep track of other attached components either by using socket names or the abovementioned tags which could provide extra flexibility:

This is just pseudoscript, ofc.


In my case, I had a specialised smart connector that performed that function - I needed to have an entity that would move data between components even though they were not attached. So it was a tad more complex. Think wireless cables.

image


Another way of keeping track of what is attached without mapping it, is to trace. You trace to each of the sides (or through every socket) and see what else is there. You’d need to create rules regarding what is considered attached - proximity / compatibility etc.

1 Like