Skip to content

Commit b4bf5b5

Browse files
committed
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.
1 parent 544b6df commit b4bf5b5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/bevy_gltf/src/loader.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,8 @@ fn load_node(
515515
node.insert(Camera {
516516
name: Some(CameraPlugin::CAMERA_3D.to_owned()),
517517
projection_matrix: perspective_projection.get_projection_matrix(),
518+
near: perspective_projection.near,
519+
far: perspective_projection.far,
518520
..Default::default()
519521
});
520522
node.insert(perspective_projection);

0 commit comments

Comments
 (0)