I'm a bit confused how to set up node hierachy properly.

For example when creating a simple blocky building, I can do it the following ways:



I would say StaticBody3D should be the parent, because it can be moved by script, but I'm not sure.
Is there a case where a collision shape automatically set its size to the size of the mesh instance?
Or do I always have to set size on both of them manually?
Are there any golden rules which could help me for other node hierachy questions I might come across in the future?

  • xyz replied to this.
  • trizZzle Static body (and its collision shapes) have nothing to do with mesh instances. Mesh instance only draws the mesh while static body is invisible and only takes part in physics simulations. The "proper" way of coupling them is you example 2. The collision shape gives the static body its shape for physics calculations while mesh instance just inherits its transformations and draws itself accordingly.

    trizZzle Static body (and its collision shapes) have nothing to do with mesh instances. Mesh instance only draws the mesh while static body is invisible and only takes part in physics simulations. The "proper" way of coupling them is you example 2. The collision shape gives the static body its shape for physics calculations while mesh instance just inherits its transformations and draws itself accordingly.