Add option to disable gizmo rendering for specific cameras#8952
Add option to disable gizmo rendering for specific cameras#8952cart merged 2 commits intobevyengine:mainfrom
Conversation
nicopap
left a comment
There was a problem hiding this comment.
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
RenderGizmoscomponent would work. Surely, it would be added to theCameraBundle, but then how do you remove theRenderGizmoscomponent? - 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 |
mockersf
left a comment
There was a problem hiding this comment.
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? |
cart
left a comment
There was a problem hiding this comment.
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.