Revert Input.get_vector() back to checking raw strength

This commit is contained in:
Michael Alexsander 2023-02-19 22:52:35 -03:00
parent 9f68d06ec2
commit 9a25d56ed9

View file

@ -352,8 +352,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 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( Vector2 vector = Vector2(
get_action_strength(p_positive_x) - get_action_strength(p_negative_x), get_action_raw_strength(p_positive_x) - get_action_raw_strength(p_negative_x),
get_action_strength(p_positive_y) - get_action_strength(p_negative_y)); get_action_raw_strength(p_positive_y) - get_action_raw_strength(p_negative_y));
if (p_deadzone < 0.0f) { if (p_deadzone < 0.0f) {
// If the deadzone isn't specified, get it from the average of the actions. // If the deadzone isn't specified, get it from the average of the actions.