You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using bevy_ecs_ldtk and I'm trying to set the render layer (for offscreen camera purposes) for the spawned grids, but I'm having trouble making it work. I tried setting it in the bundle:
fnadd_layer(mutcommands:Commands,wall_query:Query<&Parent,Added<Wall>>,parent_query:Query<Entity,(With<Parent>,Without<Wall>)>,){for parent in ground_query.iter(){ifletOk(entity) = parent_query.get(parent.get()){
commands.entity(entity).insert(RenderLayers::layer(1));}}}
But this doesn't affect the background. I'm not sure how to target the background entity directly, so I'm currently using this hacky background:
fnfix_background(mutcommands:Commands,query:Query<Entity,(With<Sprite>,Without<...>)>,){for sprite in query.iter(){
commands.entity(sprite).insert(RenderLayers::layer(1));}}
I had to litter it with Without<...> so that it doesn't affect any unwanted sprites. Is there a better way of doing this?
I'm using
bevy_ecs_ldtk
and I'm trying to set the render layer (for offscreen camera purposes) for the spawned grids, but I'm having trouble making it work. I tried setting it in the bundle:But it doesn't work. I also tried putting it alongside the world bundle:
But it's also not working. Is there a proper way of doing this?
The text was updated successfully, but these errors were encountered: