From cde43cfd5c285dc213895cebc305d9ba7f094d1a Mon Sep 17 00:00:00 2001 From: tcmal Date: Sun, 25 Aug 2024 17:44:22 +0100 Subject: feat(contrib): add mouse input to flycam controls --- examples/render-bsp/src/main.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'examples/render-bsp/src') diff --git a/examples/render-bsp/src/main.rs b/examples/render-bsp/src/main.rs index 5c03676..9332629 100644 --- a/examples/render-bsp/src/main.rs +++ b/examples/render-bsp/src/main.rs @@ -25,7 +25,7 @@ use winit::{event::Event, event_loop::EventLoop, window::WindowBuilder}; use stockton_contrib::delta_time::*; use stockton_contrib::flycam::*; -use stockton_input::{Axis, InputManager}; +use stockton_input::{Axis, InputManager, Mouse}; use stockton_levels::{prelude::*, q3::Q3BSPFile}; use stockton_render::{ do_render_system, draw::calc_vp_matrix_system, window::process_window_events_system, Renderer, @@ -110,7 +110,8 @@ fn main() { resources.insert(renderer); resources.insert(bsp); resources.insert(manager); - resources.insert(Timing::default()) + resources.insert(Timing::default()); + resources.insert(Mouse::default()); }, move |schedule| { schedule @@ -134,7 +135,7 @@ fn main() { fov: 90.0, near: 0.1, }, - FlycamControlled { speed: 512.0 }, + FlycamControlled::new(512.0, 400.0), )); // Done loading - This is our main loop. -- cgit v1.2.3