-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Merged by Bors] - add a SpatialBundle with visibility and transform components #5344
Conversation
@IceSentry this isn't a breaking change but will need to go in the migration guide. |
@alice-i-cecile about your review, I would prefer to keep as is and have a followup PR changing the style everywhere |
Alright, I'm on board. Can you make a quick issue so we don't forget? |
/// * To show or hide an entity, you should set its [`Visibility`]. | ||
/// * To get the computed visibility of an entity, you should get its [`ComputedVisibility`]. | ||
/// * To place or move an entity, you should set its [`Transform`]. | ||
/// * To get the global position of an entity, you should get its [`GlobalTransform`]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not just global position, but global transform. :) Maybe note that it is only valid for the current frame after transform propagation has been run?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the one hand, this is useful information. On the other hand, idk if we should be duplicating it across every bundle that includes GlobalTransform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do agree that "global transform" is preferable to "global position".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// * [`Transform`] and [`GlobalTransform`], which describe the position of an entity | ||
/// | ||
/// * To show or hide an entity, you should set its [`Visibility`]. | ||
/// * To get the computed visibility of an entity, you should get its [`ComputedVisibility`]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe note that it is only valid after the visibility systems have been run? (check_visibility and visibility_propagate, I think.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the one hand, this is useful information. On the other hand, idk if we should be duplicating it across every bundle that includes ComputedVisibility. ComputedVisibility does have this "label dependency" information encoded in the relevant fields already. But it is probably worth also including that in the main ComputedVisibility docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Not something I think we should block on here though)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Robert Swain <[email protected]>
bors r+ |
# Objective - Help user when they need to add both a `TransformBundle` and a `VisibilityBundle` ## Solution - Add a `SpatialBundle` adding all components
Pull request successfully merged into main. Build succeeded: |
…ine#5344) # Objective - Help user when they need to add both a `TransformBundle` and a `VisibilityBundle` ## Solution - Add a `SpatialBundle` adding all components
…ine#5344) # Objective - Help user when they need to add both a `TransformBundle` and a `VisibilityBundle` ## Solution - Add a `SpatialBundle` adding all components
…ine#5344) # Objective - Help user when they need to add both a `TransformBundle` and a `VisibilityBundle` ## Solution - Add a `SpatialBundle` adding all components
Objective
TransformBundle
and aVisibilityBundle
Solution
SpatialBundle
adding all components