Create Dir type for better enforcement of non NaN, normalized representations of directions

This commit is contained in:
Imbris
2020-03-27 21:31:22 -04:00
parent df5a7ef0e3
commit ba3fa16c33
27 changed files with 296 additions and 179 deletions

View File

@ -1,4 +1,4 @@
use crate::sync::Uid;
use crate::{sync::Uid, util::Dir};
use specs::{Component, FlaggedStorage};
use specs_idvs::IDVStorage;
use std::time::Duration;
@ -146,7 +146,7 @@ pub struct ControllerInputs {
pub charge: Input,
pub climb: Option<Climb>,
pub move_dir: Vec2<f32>,
pub look_dir: Vec3<f32>,
pub look_dir: Dir,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]