Replace default deadzone magic number with named constant
This commit is contained in:
parent
0f5f3bc954
commit
829dade53b
5 changed files with 9 additions and 6 deletions
|
|
@ -1097,7 +1097,7 @@ JoyAxis InputEventJoypadMotion::get_axis() const {
|
|||
|
||||
void InputEventJoypadMotion::set_axis_value(float p_value) {
|
||||
axis_value = p_value;
|
||||
pressed = Math::abs(axis_value) >= 0.5f;
|
||||
pressed = Math::abs(axis_value) >= InputMap::DEFAULT_DEADZONE;
|
||||
emit_changed();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue