Replies: 2 comments
-
|
Any hint how this can be done with the current version? |
Beta Was this translation helpful? Give feedback.
-
|
A bit late perhaps, but i still found this thread, and i have found an answer. (Works for v. 0.17.3) Lets say you have your render layers: pub const RENDER_LAYER_NETTVERK: usize = 0;
pub const RENDER_LAYER_ALLE_INDIVIDER: usize = 1;
pub const RENDER_LAYER_POPULASJON_MENY: usize = 2;You can then use the following system to adjust the render layer of gizmoes from the default 0, to 1. app.add_systems(Startup, update_gizmo_config);fn update_gizmo_config(
mut config_store: ResMut<GizmoConfigStore>,
) {
let (config, _) = config_store.config_mut::<DefaultGizmoConfigGroup>();
config.render_layers = RenderLayers::layer(RENDER_LAYER_ALLE_INDIVIDER);
}If it does not work in future versions, here are some hints on where to start investigating: GizmoConfig is the object that is holding the renderLayer. It is just an object. To modify it you retrieve it through the bevy-Resource GizmoConfigStore. (the type DefaultGizmoConfigGroup is just something that the config_mut function uses for what to give in the second argument it seems like. Not actual important in this case) https://idanarye.github.io/bevy-tnua/bevy_gizmos/config/struct.GizmoConfig.html |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
If I have two cameras with different render layers and I want some gizmos to be rendered using one camera and some using another.
This obviously does not work. I need to commit some gizmos between systems.
And an additional question: is it possible to draw text in the same manner?
Beta Was this translation helpful? Give feedback.
All reactions