mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
Detect camera projection changes (#2015)
This commit is contained in:
parent
3f4d50bab9
commit
c32c37d737
1 changed files with 4 additions and 1 deletions
|
@ -99,7 +99,10 @@ pub fn camera_system<T: CameraProjection + Component>(
|
|||
}
|
||||
for (entity, mut camera, mut camera_projection) in queries.q0_mut().iter_mut() {
|
||||
if let Some(window) = windows.get(camera.window) {
|
||||
if changed_window_ids.contains(&window.id()) || added_cameras.contains(&entity) {
|
||||
if changed_window_ids.contains(&window.id())
|
||||
|| added_cameras.contains(&entity)
|
||||
|| camera_projection.is_changed()
|
||||
{
|
||||
camera_projection.update(window.width(), window.height());
|
||||
camera.projection_matrix = camera_projection.get_projection_matrix();
|
||||
camera.depth_calculation = camera_projection.depth_calculation();
|
||||
|
|
Loading…
Reference in a new issue