diff --git a/src/navigation.rs b/src/navigation.rs index 4f5f6cd..4417ca6 100644 --- a/src/navigation.rs +++ b/src/navigation.rs @@ -1,4 +1,7 @@ -use std::{collections::HashMap, error::Error, fmt::Debug, hash::Hash, marker::PhantomData}; +use std::{ + collections::HashMap, error::Error, f32::consts::PI, fmt::Debug, hash::Hash, + marker::PhantomData, +}; use bevy::prelude::*; use bevy_input_actionmap::InputMap; @@ -41,11 +44,15 @@ pub struct Speed(pub f32); #[reflect(Component)] pub struct Sprinting; +#[derive(Default, Deref, DerefMut)] +struct Snapping(bool); + fn movement_controls( mut commands: Commands, config: Res>, input: Res>, time: Res