Can you make a hierarchical Go without a Collection? (Solved)

The problem:
I have a fairly complex object - an aircraft carrier. I normally load it along with all the other collision object types into a collection, which only includes the f18 atm so it can take off/land from it (collision wise).
The issue is, I want the aircraft carrier to be spawnable (potentially more than one) and same with the f18. However, these are complex objects so they are built as collections (they have a hierarchy of game objects in them for all sorts of necessary reasons).

The current solution wont work with different mission loads and area loads due to the composition of the entities I want in the missions and maps, and especially if I need collisions between them.

I built a gltf loader previously that lets me make go’s at runtime and parent them etc, I think this might be how I have to tackle this (esp if I want collision) but I was wondering if there was a way to do this in a gameobject in the editor (would be much cleaner/simpler if I could).

My understanding is that it is not likely possible. Because collections are essentially the scene structures for a world, and go’s are kind of a single object flat structure, but any info/help would be great. As mentioned I have a fallback, and its more runtime friendly so that might be where I need to change to anyway.

Ok. While tinkering just then. I think I have kind of a weird solution, but its messy.

I can use meshes as “parts” of the game object. They will be all flat, so they lose their hierarchy, but I can prob just use a naming convention on them. Its not pretty, but I think this might work.
Im assuming then I can use the aircraft carrier in a factory and its collisions will come into the same world as the other factory instances and all should be wonderful? Will see. Will update here if Im successful using this method.

Ok. Yeah looks like gameobjects are collapsed.

I vaguely remember this from building the runtime loading for Flix.
Will make a runtime go loader/manager or use one of the others Ive made before. doh! :slight_smile:

Ok. Additional story to all this. And Im horribly confused, kinda happy, but puzzled why it works.
To make things clear, here my main collection structure:
Collection:

+--> main (go)
    +--> blue (go)
        +--> f18 (factory)
    +--> targets (go)
        +--> nimitz (collectionfactory)
        +--> tanker (factory)
    +--> threats (go)
        +--> ddg (factory)
        +--> mig29 (factory)
    +--> game (collectionfactory)
    +--> maps (collectionfactory)
    +--> mission (collectionfactory)

There are other objects but they are not needed for this discussion.
Initially I was having problems when loading in the nimitz with collisions needing to occur between f18 and nimitz. So I moved them both to the game collectionfactory. And collision worked fine. However, this lead to other problems (since I need to instance and interact with other collision objects).

My initial understanding was that collectionfactories have their own “world” and thus their own physics space etc. Based on these docs here:

However… I think I was getting collectionfactories and collectionproxies mixed up. I did some simpler tests and the collectionfactories operate the way they should and all the objects come into the one world (main collection essentially) and the physics works between them.

So Im quite relived this is the case. But Im quite puzzled about why originally the physics wouldnt interact? Maybe it was the kinematics setting or something. Im not sure. Maybe even the grouping/masking I had.. Im sure it was all default tho. Uggh. anyway.

So very sorry for all that. Im surprised after all this time, Im still making super stupid mistakes. I guess it is hard to teach old dogs new tricks :slight_smile:

1 Like