Merge pull request #69028 from YeldhamDev/its_raw_you_donkey

Make `Input.get_vector()` check for plain `strength` instead of the raw one
This commit is contained in:
Rémi Verschelde 2023-01-25 09:15:45 +01:00
commit 93c650c10d
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -349,8 +349,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.