fn update_screen_bounds(
    mut query: Query<(
        &mut MainCamera,
        ChangeTrackers<PerspectiveProjection>,
        &PerspectiveProjection,
        ChangeTrackers<Transform>,
        &Transform,
    )>,
) {
    let (
        mut main_camera,
        camera_projection_tracker,
        camera_projection,
        camera_transform_tracker,
        camera_transform,
    ) = query.single_mut();
    if camera_projection_tracker.is_changed() || camera_transform_tracker.is_changed() {
        main_camera.update_screen_bounds(camera_projection, camera_transform);
    }
}
/// Calculate screen bounds based on camera projection.

Calculate screen bounds based on camera projection.
Calculate screen bounds based on camera projection .
fn update_screen_bounds(
    mut query: Query<(
        &mut MainCamera,
        ChangeTrackers<PerspectiveProjection>,
        &PerspectiveProjection,
        ChangeTrackers<Transform>,
        &Transform,
    )>,
) {
    let (
        mut main_camera,
        camera_projection_tracker,
        camera_projection,
        camera_transform_tracker,
        camera_transform,
    ) = query.single_mut();
    if camera_projection_tracker.is_changed() || camera_transform_tracker.is_changed() {
        main_camera.update_screen_bounds(camera_projection, camera_transform);
    }
}
fn update_screen_bounds ( mut query : Query < ( & mut MainCamera , ChangeTrackers < PerspectiveProjection > , & PerspectiveProjection , ChangeTrackers < Transform > , & Transform , ) > , ) { let ( mut main_camera , camera_projection_tracker , camera_projection , camera_transform_tracker , camera_transform , ) = query . single_mut ( ) ; if camera_projection_tracker . is_changed ( ) || camera_transform_tracker . is_changed ( ) { main_camera . update_screen_bounds ( camera_projection , camera_transform ) ; } }
Calculate screen bounds based on camera projection.
Calculate screen bounds based on camera projection .
query
Query<(
        &mut MainCamera,
        ChangeTrackers<PerspectiveProjection>,
        &PerspectiveProjection,
        ChangeTrackers<Transform>,
        &Transform,
    )>
query
Query<(
        &mut MainCamera,
        ChangeTrackers<PerspectiveProjection>,
        &PerspectiveProjection,
        ChangeTrackers<Transform>,
        &Transform,
    )>