summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicha White <botahamec@outlook.com>2022-10-13 10:04:30 -0400
committerMicha White <botahamec@outlook.com>2022-10-13 10:04:30 -0400
commit0cb5bb79987ee60c49271e2905380500c75e762f (patch)
treeb176ff124e5dc5eb81574b0c5c8240c7f7f7ed3a
parent11a7989f049e8e294f545176e12f7e6d252be49c (diff)
Tested rotation
-rw-r--r--examples/bmp.rs2
-rw-r--r--src/camera.rs1
2 files changed, 3 insertions, 0 deletions
diff --git a/examples/bmp.rs b/examples/bmp.rs
index 39e83e2..7b649da 100644
--- a/examples/bmp.rs
+++ b/examples/bmp.rs
@@ -79,5 +79,7 @@ fn main() {
..Default::default()
});
+ renderer.camera_mut().set_rotation(0.1);
+
renderer.run(event_loop);
}
diff --git a/src/camera.rs b/src/camera.rs
index edc3405..fb46158 100644
--- a/src/camera.rs
+++ b/src/camera.rs
@@ -151,6 +151,7 @@ impl Camera {
#[allow(clippy::wrong_self_convention)]
fn to_matrix(&self) -> CameraUniform {
+ // TODO why do the camera and instances rotate in different directions?
let cos = self.rotation.cos();
let sin = self.rotation.sin();