Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Collision Container #4559

Closed
mrjustaguy opened this issue May 18, 2022 · 2 comments
Closed

Add Collision Container #4559

mrjustaguy opened this issue May 18, 2022 · 2 comments

Comments

@mrjustaguy
Copy link

Describe the project you are working on

Character Logic

Describe the problem or limitation you are having in your project

The Logic would be greatly simplified if instead of CharacterBody (and other physics bodies) had an option to set a container as a Collision Shape, that doesn't have to be the direct child of the body, which contains all the collision shapes, not to mention it would allow for collapsing a branch in the editor to clear potentially dozens of collision shapes, without affecting things like meshes

Describe the feature / enhancement and how it helps to overcome the problem or limitation

  1. Collision Container would allow for all the collision shapes to be it's children, and collapsing it would hide a ton of Collision Shapes.
  2. Having the option to specify a collision container on a body that isn't it's direct child, but might be a child of a child (something that can be useful for things such as implementing gimbal like node structures for body control, instead of having to code the logic explicitly, as having the body be a child of the gimbal instead of it's parent makes a whole host of other problems)
    Without Collision Containers this would be a mess to implement due to bodies potentially having multiple collision shapes

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Create a Collison Container, whose children would be Collision Shapes/Polygons
Make Bodies automatically Search for Collision Container as their Children (in addition to current behavior), but allow for the User to specify a Node path in the Body Tree as the Collision Shape even if it's not it's direct child. this could potentially be list, but it's most likely users will use only one Collision Container, and maybe nest them

If this enhancement will not be used often, can it be worked around with a few lines of script?

It can be worked around, but it isn't a few lines of code.

Is there a reason why this should be core and not an add-on in the asset library?

It's UX.

@Zireael07
Copy link

dupe/related to #535?

@mrjustaguy
Copy link
Author

Seems like a dupe, so closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants