diff --git a/src/bin/wireframe/main.rs b/src/bin/wireframe/main.rs index 66cee23..afa4525 100644 --- a/src/bin/wireframe/main.rs +++ b/src/bin/wireframe/main.rs @@ -49,10 +49,10 @@ mod camctl { } pub fn rotate_rel_ypr(&mut self, ypr: Vec3) { - self.rotate_rel_quat(Quat::from_euler(glam::EulerRot::XYZ, ypr.x, ypr.y, ypr.z)); + self.rotate_rel_quat(Quat::from_euler(glam::EulerRot::ZYX, ypr.x, ypr.y, ypr.z)); } - pub fn rotate_rel_quat(&mut self, rot: Quat) { + fn rotate_rel_quat(&mut self, rot: Quat) { self.rot *= rot; } } @@ -104,12 +104,12 @@ static KEYS_MOVE: &'static [(PhysicalKey, Vec3)] = &[ ]; static KEYS_ROTATE: &'static [(PhysicalKey, Vec3)] = &[ - (PhysicalKey::Code(KeyCode::Numpad9), vec3(1., 0., 0.)), - (PhysicalKey::Code(KeyCode::Numpad7), vec3(-1., 0., 0.)), + (PhysicalKey::Code(KeyCode::Numpad4), vec3(1., 0., 0.)), + (PhysicalKey::Code(KeyCode::Numpad6), vec3(-1., 0., 0.)), (PhysicalKey::Code(KeyCode::Numpad5), vec3(0., 1., 0.)), (PhysicalKey::Code(KeyCode::Numpad8), vec3(0., -1., 0.)), - (PhysicalKey::Code(KeyCode::Numpad4), vec3(0., 0., 1.)), - (PhysicalKey::Code(KeyCode::Numpad6), vec3(0., 0., -1.)), + (PhysicalKey::Code(KeyCode::Numpad9), vec3(0., 0., 1.)), + (PhysicalKey::Code(KeyCode::Numpad7), vec3(0., 0., -1.)), ]; struct State<'a> {