Nested rigidbodies

Is it possible to nest a dynamic rigidbody inside of a static one? Like a sphere inside a sphere?

Hi @groupsjrBrianDouglas! I don’t think that’s possible, but you could give it a try. Why do you want to do that?

I am making something the user can shake and it needs to be filled with small elements.

Hi @groupsjrBrianDouglas,

In that case, why would they need to be children of the container entity? It would work as intended even if the dynamic rigidbodies are not children of the container.

They need to be nested because the container is enabled and disabled. This is for an AR piece.

If you are enabling and disabling them via a script, wouldn’t it be possible to just put them all under an empty entity(not a child of the container), and enable and disable that along with the container(perhaps using tags here might help)?

I’ll post a test tomorrow(cooking today) but the issue is that they never stay inside the container. they easily fall out.

Is the container collider a primitive shape or a mesh collider? Mesh collider often might not work in complex shapes with small objects. However, I would suggest trying it out with the approach I suggested and seeing if the problem persists.

If it can be a square container you can use 6 box primitives (with collision and rigidbody component) to create the walls of the container.

needs to be a sphere

In that case, would a low poly model suffice for your project? Otherwise mesh colliders might not work great. If that is not an option, and if you are willing to somewhat compromise, compound colliders would be the best choice for your case.