0 votes

How can I select all the static bodies across the tree, that have specific collision layer deifined? Is there a simple solution or do I have to recursively traverse the whole tree and check for each node?

asked Nov 12, 2019 in Engine by gmaps (692 points)

Would it work to use groups?

I would still have to traverse the whole tree to add the nodes to the group, so the problem is still there.

How are you configuring the collision layers? Do certain entities/scenes belong to certain layers? Could you set the group for that entity type? Or are you changing the collision layers dynamically at runtime?

I'm making an addon, and I would like it to work "out of the box", so the user doesn't have to add all the nodes to a group for it to work.

Please log in or register to answer this question.

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.