diff options
Diffstat (limited to 'client/src/camera.rs')
-rw-r--r-- | client/src/camera.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/client/src/camera.rs b/client/src/camera.rs index ea984b3..78ce240 100644 --- a/client/src/camera.rs +++ b/client/src/camera.rs @@ -39,7 +39,9 @@ impl Camera { } } pub fn update(&mut self, input_move: Vec3, input_rot: Vec2, dt: f32) { - self.pos += self.rotation_mat() * (vec3(input_move.z, input_move.y, -input_move.x) * dt); + let speed = 3.; + let vel_local = vec3(input_move.z, input_move.y, -input_move.x) * dt * speed; + self.pos += self.rotation_mat() * vel_local; self.rot.x += input_rot.x * -0.002; self.rot.y += input_rot.y * -0.002; } |