diff options
-rw-r--r-- | engine/src/camera.rs | 2 | ||||
-rw-r--r-- | engine/src/renderer/mod.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/engine/src/camera.rs b/engine/src/camera.rs index 1bae5bb..7abb9af 100644 --- a/engine/src/camera.rs +++ b/engine/src/camera.rs @@ -12,7 +12,7 @@ pub trait Camera /// /// The default implementation which returns [`Vec3::UP`] should be fine in most /// cases. - fn up(&self) -> Vec3<f32> + fn global_up(&self) -> Vec3<f32> { Vec3::UP } diff --git a/engine/src/renderer/mod.rs b/engine/src/renderer/mod.rs index 2c513ff..9996551 100644 --- a/engine/src/renderer/mod.rs +++ b/engine/src/renderer/mod.rs @@ -350,7 +350,7 @@ fn create_view(camera: &impl Camera) -> Matrix<f32, 4, 4> { let mut view = Matrix::new(); - view.look_at(&camera.position(), &camera.target(), &camera.up()); + view.look_at(&camera.position(), &camera.target(), &camera.global_up()); view } |