How do you spawn a Prefab that has more than one rigid body in it?
This feels like it should just work, but Rigid bodies need to be top level, and ghosts, so how do you setup a prefab that has more than one rigid body (for example a door, or a chest with Top and Bottom part independent).
Or in a more “complex” scenario, a Table with multiple decorations on top that are fully independent of each other.
This seems like I just not really understanding the intended usage, or is this setup not really supported ?
“Composites” of physics or netcode entities is a use-case that still isn’t well supported by prefabs. I had a similar situation where I wanted to build ships out of prefabbed parts, where the parts have a separate physical (kinematic) and networking identity from the ship itself. Currently, I work around the restrictions by having empty “placeholders” in a prefab that reference other prefabs that are then instantiated and parented at runtime, but this is convoluted and complicates the initialization process. (I’ve often felt it was a little silly that, after all the pieces are assembled again at runtime, the kinematic physics bodies and the ghosts all work fine, so were those forcible restrictions really necessary?)
You could probably use a Subscene instead for this sort of thing, though.
Yeah, but this makes the authoring a bit convoluted now. I was trying to play around with automatically doing the authoring step.
My idea was to use createadditionalentities to create the spawners automatically when baking this is proving hard than necessary mostly because there is no easy way to controll hierarchy at baking AFAIK.