Closed porkbrain closed 6 months ago
I reckon that if the following queries used GlobalTransform then we could have lights and occluders as children of entities whose transform is changing:
GlobalTransform
pub fn system_extract_pipeline_assets( res_light_settings: Extract<Res<BevyMagicLight2DSettings>>, res_target_sizes: Extract<Res<ComputedTargetSizes>>, query_lights: Extract<Query<(&Transform, &OmniLightSource2D, &InheritedVisibility, &ViewVisibility)>>, query_occluders: Extract<Query<(&LightOccluder2D, &Transform, &InheritedVisibility, &ViewVisibility)>>, query_camera: Extract<Query<(&Camera, &GlobalTransform), With<FloorCamera>>>, query_masks: Extract<Query<(&Transform, &SkylightMask2D)>>, query_skylight_light: Extract<Query<&SkylightLight2D>>, mut gpu_target_sizes: ResMut<ComputedTargetSizes>, mut gpu_pipeline_assets: ResMut<LightPassPipelineAssets>, mut gpu_frame_counter: Local<i32>, )
Am I missing something?
I cloned the project and tried it - works without seemingly breaking anything.
I reckon that if the following queries used
GlobalTransform
then we could have lights and occluders as children of entities whose transform is changing:Am I missing something?