diff --git a/src/main.rs b/src/main.rs index af0354c2..cdd96b20 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,6 +30,7 @@ struct Camera { controls: u32, mv: f32, grounded: bool, + walkspeed: f32, } const CONTROL_MOVEFORWARD:u32 = 0b00000001; @@ -221,6 +222,7 @@ impl strafe_client::framework::Example for Skybox { mv: 2.7, controls:0, grounded: true, + walkspeed: 18.0, }; let raw_uniforms = camera.to_uniform_data(); let uniform_buf = device.create_buffer_init(&wgpu::util::BufferInitDescriptor { @@ -533,10 +535,12 @@ impl strafe_client::framework::Example for Skybox { } if self.camera.grounded { let applied_friction=self.camera.friction*dt; - if applied_friction*applied_friction