Static rigidbodies

This question is only regarding convenient usage when having mutliple colliders for entities belonging together. When using a rigidbody for the root entity the raycast hits on the children entities are referring to the root entity which is useful for further processing in my case. But the root entity then is considered dynamic. But in my case it is static and not subject to any physics. Is there a way to make it a static body and still having the convenient raycasting and getting the root entity on hits?

If you don't use any rigid body authoring component at the root, the resultant rigid body entity will be static.

But when using the root component without RigidBody then the RaycastHit.Entity does not point to the root anymore instead to the entity containing the collider hit during the raycast. I want to easily determine the root component on raycast hits for static bodies. Is there a simple way of still achieving this behavior?

The root entity will not have a parent component. Use the parent component to traverse up the hierarchy to the root.

1 Like