diff options
author | Michael Alexsander <michaelalexsander@protonmail.com> | 2022-11-22 18:18:56 -0300 |
---|---|---|
committer | Michael Alexsander <michaelalexsander@protonmail.com> | 2022-11-22 18:18:56 -0300 |
commit | a4e2978352e5cb92ff71ef1486e1a20d5cf1745d (patch) | |
tree | 492b4c9d60dec3f882a63605d19d9984d8cbc582 /core/input | |
parent | 1285e0e21c812ab67882b9ca471200dfc9dc1601 (diff) |
Make `Input.get_vector()` check for plain `strength` instead of the raw one
Diffstat (limited to 'core/input')
-rw-r--r-- | core/input/input.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/input/input.cpp b/core/input/input.cpp index cb65d2569c..c1e4877220 100644 --- a/core/input/input.cpp +++ b/core/input/input.cpp @@ -343,8 +343,8 @@ float Input::get_axis(const StringName &p_negative_action, const StringName &p_p Vector2 Input::get_vector(const StringName &p_negative_x, const StringName &p_positive_x, const StringName &p_negative_y, const StringName &p_positive_y, float p_deadzone) const { Vector2 vector = Vector2( - get_action_raw_strength(p_positive_x) - get_action_raw_strength(p_negative_x), - get_action_raw_strength(p_positive_y) - get_action_raw_strength(p_negative_y)); + get_action_strength(p_positive_x) - get_action_strength(p_negative_x), + get_action_strength(p_positive_y) - get_action_strength(p_negative_y)); if (p_deadzone < 0.0f) { // If the deadzone isn't specified, get it from the average of the actions. |