From b4bf5b5d872ad17ba7c81a8d4229887b609ce09f Mon Sep 17 00:00:00 2001 From: Kirillov Kirill Date: Mon, 21 Feb 2022 23:29:32 +0000 Subject: [PATCH] Fix glTF perspective camera projection (#4006) # Objective - Fixes #4005 ## Solution - Include the `near` and `far` clipping values from the perspective projection in the `Camera` struct; before that, they were both being defaulted to 0. --- crates/bevy_gltf/src/loader.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/bevy_gltf/src/loader.rs b/crates/bevy_gltf/src/loader.rs index 1e85d483fd..e10741d6e5 100644 --- a/crates/bevy_gltf/src/loader.rs +++ b/crates/bevy_gltf/src/loader.rs @@ -515,6 +515,8 @@ fn load_node( node.insert(Camera { name: Some(CameraPlugin::CAMERA_3D.to_owned()), projection_matrix: perspective_projection.get_projection_matrix(), + near: perspective_projection.near, + far: perspective_projection.far, ..Default::default() }); node.insert(perspective_projection);