0 votes

I'm trying to build compound colliders out of CollisionShape. I'd like to have several of these together as children of a child so that I can easily remove/generate/instance them as needed.

RigidBody
    Collider0
    ColliderGroupA
        Collider1
        Collider2
    ColliderGroupB
        Collider3
        Collider4

However, only Collider0 is detected, without it the Rigidbody complains that it has no collider. It seems that I can only have colliders that are direct children?

Is there any way for the RigidBody to detect Colliders 1-4 in this configuration? If not I'll have to use groups or something else to organize and manage them.

asked Aug 8 in Engine by Aaron Franke (40 points)

1 Answer

+1 vote
Best answer

In short, no.

Bodies need shapes, and those are normally owned by the CollisionShape nodes which need to be direct children of the body.

What you can do, if you need a tree structure, is to make custom nodes that draws the shape on editor, then build that structure with the real collision shapes at runtime.

It may be possible to not use CollisionShape nodes at all (like using your own custom owner or none), but I do not understand how the shape owner system works...

answered Aug 8 by eons (6,498 points)
selected Aug 11 by Aaron Franke
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.