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.


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.

in Engine by (110 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...

by (7,910 points)
selected by
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 Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.