/target
config.yml
-/flamegraph.svg
-/perf.data
-/perf.data.old
+flamegraph.svg
+perf.data
+perf.data.old
[[package]]
name = "mt_net"
version = "0.1.0"
-source = "git+https://github.com/minetest-rust/mt_net#2bf4f75254ddfca9ef13c6a1b2a8e6210f298ab5"
+source = "git+https://github.com/minetest-rust/mt_net#ea1983ec93aa6db9dc2486713a6d974aaf3780e0"
dependencies = [
"async-trait",
"cgmath",
event::{DeviceEvent::*, Event::*, WindowEvent::*},
event_loop::ControlFlow::ExitWithCode,
platform::run_return::EventLoopExtRunReturn,
- window::CursorGrabMode,
};
mod map;
..
} => {
if !game_paused {
- state.camera.update_mouse(delta.0 as f32, delta.1 as f32);
+ state.camera.update_mouse(-delta.0 as f32, delta.1 as f32);
window
.set_cursor_position(winit::dpi::PhysicalPosition::new(
state.config.width / 2,
}
pub fn update(&mut self, dt: Duration) {
+ self.camera.yaw += Rad::from(Deg(180.0)).0;
+ self.camera.yaw *= -1.0;
+
let cam = self.camera.camera(dt.as_secs_f32());
+
+ self.camera.yaw *= -1.0;
+ self.camera.yaw -= Rad::from(Deg(180.0)).0;
+
self.camera.position = cam.position;
- self.view = Matrix4::from(cam.orthogonal());
+ self.view = Matrix4::from(cam.orthogonal());
self.camera_uniform.set(&self.queue, self.proj * self.view);
}