1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-06 19:41:11 +00:00

Merge pull request #89946 from wlsnmrk/action-press-strength-clamp

Fix `Input.action_press()` accepting out-of-bounds strength values
This commit is contained in:
Rémi Verschelde
2024-03-28 10:47:31 +01:00

View File

@@ -894,7 +894,7 @@ void Input::action_press(const StringName &p_action, float p_strength) {
}
action_state.exact = true;
action_state.api_pressed = true;
action_state.api_strength = p_strength;
action_state.api_strength = CLAMP(p_strength, 0.0f, 1.0f);
_update_action_cache(p_action, action_state);
}