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

Hierarchy propagation opt-out #7225

Closed
Aceeri opened this issue Jan 16, 2023 · 2 comments
Closed

Hierarchy propagation opt-out #7225

Aceeri opened this issue Jan 16, 2023 · 2 comments
Labels
A-Hierarchy Parent-child entity hierarchies C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Complex Quite challenging from either a design or technical perspective. Ask for help! X-Controversial There is active debate or serious implications around merging this PR

Comments

@Aceeri
Copy link
Member

Aceeri commented Jan 16, 2023

What problem does this solve or what need does it fill?

There are a lot of cases where I'd like to group entities logically together, but I can't because it would mean their positions would be required to be relative to each-other.

For example, one common usecase I've found (maybe a bit more common for me than other people given the physics-y-ness of my project) is anything with a joint needs to not have a parent entity. Otherwise the joint will either be overridden by the transform propagation and the joint essentially doesn't exist or it explodes out to infinity because it'd try to keep correcting position.
hierarchy
These are all logically the Player 1 entity in my mental model, but the hierarchy doesn't really represent that very well, it also makes it more difficult to traverse this non-standard hierarchy which I have ended up having to do quite often.

What solution would you like?

Adding a Split component that would act as if it wasn't a child of its parent during propagation.
Or maybe call it NoTransformPropagation if it won't be that generic over the different propagation stuffs.

What alternative(s) have you considered?

  • Having alternative hierarchies be less error prone for users to create.
  • Maybe propagation as an opt in? But I don't see that worth the confusion with more basic cases.
@Aceeri Aceeri added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Jan 16, 2023
@alice-i-cecile alice-i-cecile added C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Complex Quite challenging from either a design or technical perspective. Ask for help! A-Hierarchy Parent-child entity hierarchies X-Controversial There is active debate or serious implications around merging this PR and removed C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Jan 16, 2023
@alice-i-cecile
Copy link
Member

The main challenges here are avoiding serious performance hits and user-facing complexity. Definitely want this though in some form.

See #3742 for a general purpose tool for alternative hierarchies.

@Aceeri
Copy link
Member Author

Aceeri commented Jan 17, 2023

Actually yeah, thinking about it I think relations in general would solve this in a cleaner way.

@Aceeri Aceeri closed this as completed Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Hierarchy Parent-child entity hierarchies C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Complex Quite challenging from either a design or technical perspective. Ask for help! X-Controversial There is active debate or serious implications around merging this PR
Projects
None yet
Development

No branches or pull requests

2 participants