-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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 option to disable gizmo rendering for specific cameras #8952
Conversation
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.
Bevy usually has additive components (ie: component that enables gizmo) rather than subtractive components.
But here is the catch:
- I'm not sure how a
RenderGizmos
component would work. Surely, it would be added to theCameraBundle
, but then how do you remove theRenderGizmos
component? - gizmos exist for debugging, so API ergonomics trump all.
couldn't render layers be used? |
This was originally my plan but render layers are not extracted to the render world so using that would require additional bookkeeping. |
Would this similar to what is done in #8332 for UI? |
Yeah, would you prefer I grab the |
Yes. @james7132 seemed to not be a fan to add those to the render app, but if ECS/renderer experts are OK with that it would have my preference |
My preference is also for reusing the |
8986355
to
26a1367
Compare
@james7132 probably didn't like paying the cost of extracting |
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 would prefer to be able to set the render layer per gizmo to decide which goes to which camera, but that seems already useful as is
We definitely want more granular settings. I'll open some issues for future improvements to bevy_gizmos soon. |
@devil-ira can you update the PR description to reflect the new changes? |
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 updated the description and reverted the split_screen
"renderlayer gizmo" changes. split_screen
exists to show a minimal split screen setup. Adding gizmo config to it adds unnecessary noise. We should create a new example if we want that.
Oops, didn't mean to commit the split_screen changes. |
Added
GizmoConfig::render_layers
, which will ensure Gizmos are only rendered on cameras that can see thoseRenderLayers
.