diff options
author | tcmal <me@aria.rip> | 2024-08-25 17:44:22 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-08-25 17:44:22 +0100 |
commit | cde43cfd5c285dc213895cebc305d9ba7f094d1a (patch) | |
tree | 426b3179b2367d8823dd6ed537ba4548214f8cd6 /examples | |
parent | 1a0ac4464c2053e8b08e867c3abb77b89d951d9c (diff) |
feat(contrib): add mouse input to flycam controls
Diffstat (limited to 'examples')
-rw-r--r-- | examples/render-bsp/src/main.rs | 7 |
1 files changed, 4 insertions, 3 deletions
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. |