mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-12-24 21:08:19 -06:00
maybe this will work?
This commit is contained in:
parent
00839d6b2e
commit
97122bbd2b
|
@ -98,7 +98,7 @@ fn update_input_state_gamepad (
|
|||
active_gamepad: UniqueView<ActiveGamepad>,
|
||||
mut inputs: UniqueViewMut<Inputs>,
|
||||
) {
|
||||
if let Some(Some(gamepad)) = active_gamepad.0.map(|id| gilrs.0.connected_gamepad(id)) {
|
||||
if let Some(gamepad) = active_gamepad.0.map(|id| gilrs.0.gamepad(id)) {
|
||||
let left_stick = vec2(gamepad.value(Axis::LeftStickX), gamepad.value(Axis::LeftStickY));
|
||||
let right_stick = vec2(gamepad.value(Axis::RightStickX), -gamepad.value(Axis::RightStickY));
|
||||
inputs.movement += left_stick;
|
||||
|
|
Loading…
Reference in a new issue