Closed Invisible-Rabbit-Hunter closed 2 months ago
IMO the fix here is #551 :)
I actually just noticed that the axis_inputs
example fails even earlier, due to a similar issue, where ActionState::pressed
is used for both InputControlKind::DualAxis
and InputControlKind::Axis
, which causes an assertion to fail.
Version
0.15.0
Operating system & version
Fedora 40 Workstation
What you did
Defining an action
Action::A
to be anInputControlKind::Button
, I tried to query its value usingaction_state.value(&Action::A)
.What you expected to happen
The program reads the trigger value, as is supposed to be shown in the example
axis_inputs
.What actually happened
The program crashes with an assertion error, as
Action::input_control_kind(&Action::A) != InputControlKind::Axis
.Additional information
Note that
ActionState::value
has the assertion thatAction::input_control_kind(&Action::A) == InputControlKind::Axis
(see this line), which is clearly false for the defined action. Note that the exampleaxis_inputs
also crashes on the main branch (as of Thursday, 8th of August 2024) for the exact same reason, and thus should work as a reproducible example.