Add up/down controls
This commit is contained in:
parent
964c977500
commit
37192cfd06
|
|
@ -137,11 +137,16 @@ fn main() {
|
|||
let ctl_right = keys_pressed.contains(&PhysicalKey::Code(KeyCode::KeyD));
|
||||
let ctl_fwd = keys_pressed.contains(&PhysicalKey::Code(KeyCode::KeyW));
|
||||
let ctl_bwd = keys_pressed.contains(&PhysicalKey::Code(KeyCode::KeyS));
|
||||
let ctl_up = keys_pressed.contains(&PhysicalKey::Code(KeyCode::Space));
|
||||
let ctl_down =
|
||||
keys_pressed.contains(&PhysicalKey::Code(KeyCode::ShiftLeft));
|
||||
[
|
||||
(ctl_left, vec3(-1., 0., 0.)),
|
||||
(ctl_right, vec3(1., 0., 0.)),
|
||||
(ctl_fwd, vec3(0., 0., 1.)),
|
||||
(ctl_bwd, vec3(0., 0., -1.)),
|
||||
(ctl_up, vec3(0., 1., 0.)),
|
||||
(ctl_down, vec3(0., -1., 0.)),
|
||||
]
|
||||
.into_iter()
|
||||
.filter_map(|(ctl, dir)| ctl.then_some(dir))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user