Flycam rewrite #7
|
@ -1,8 +1,7 @@
|
|||
use glam::{Mat4, Quat, Vec2, Vec3};
|
||||
use std::time::Instant;
|
||||
use winit::event::{ElementState, VirtualKeyCode};
|
||||
|
||||
const LN2: f32 = 0.6931472; // TODO figure out how to use lazy_static! or something
|
||||
use std::f32::consts::LN_2;
|
||||
|
||||
pub trait Camera {
|
||||
fn get_eye(&self) -> [f32; 4];
|
||||
|
@ -58,8 +57,8 @@ impl Flycam {
|
|||
velocity: Vec3::new(0.0, 0.0, 0.0),
|
||||
position: Vec3::new(0.0, 0.5, 1.0),
|
||||
turn_sensitivity,
|
||||
thrust_mag: thrust_speed / damper_half_life * LN2,
|
||||
damping_coeff: LN2 / damper_half_life,
|
||||
thrust_mag: thrust_speed / damper_half_life * LN_2,
|
||||
damping_coeff: LN_2 / damper_half_life,
|
||||
aspect: 1.0, // TODO compute from size
|
||||
fovy: std::f32::consts::FRAC_PI_2,
|
||||
znear: 0.01,
|
||||
|
|
Loading…
Reference in New Issue