Fix camera controller
@@ -400,7 +400,7 @@ impl rend3_framework::App for SceneViewer {
let rotation =
Mat3A::from_euler(glam::EulerRot::XYZ, -self.camera_pitch, -self.camera_yaw, 0.0).transpose();
- let forward = rotation.z_axis;
+ let forward = -rotation.z_axis;
let up = rotation.y_axis;
let side = -rotation.x_axis;
let velocity = if button_pressed(&self.scancode_status, platform::Scancodes::SHIFT) {
@@ -549,8 +549,8 @@ impl rend3_framework::App for SceneViewer {
DVec2::new(delta_x, delta_y)
};
- self.camera_yaw += (mouse_delta.x / 1000.0) as f32;
- self.camera_pitch += (mouse_delta.y / 1000.0) as f32;
+ self.camera_yaw -= (mouse_delta.x / 1000.0) as f32;
+ self.camera_pitch -= (mouse_delta.y / 1000.0) as f32;
if self.camera_yaw < 0.0 {
self.camera_yaw += TAU;
} else if self.camera_yaw >= TAU {
