Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Input.action_press() accepting out-of-bounds strength values #89946

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

wlsnmrk
Copy link
Contributor

@wlsnmrk wlsnmrk commented Mar 27, 2024

Fixes #89945.

Fixed Input.action_press() treatment of strength parameter by clamping between 0 and 1. Fixes Input.action_press() setting out-of-bounds values into action state, and out-of-bounds values subsequently being returned by Input.get_action_strength().

Changed Input.action_press() treatment of strength parameter to match
behavior of InputEventAction and documentation, by clamping between 0
and 1. Fixes Input.get_action_strength() returning values over 1 when
large values are passed to Input.action_press().
@wlsnmrk wlsnmrk requested a review from a team as a code owner March 27, 2024 16:04
@AThousandShips AThousandShips added this to the 4.3 milestone Mar 27, 2024
@akien-mga akien-mga merged commit 237479f into godotengine:master Mar 28, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@wlsnmrk wlsnmrk deleted the action-press-strength-clamp branch March 28, 2024 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Input.action_press() accepts and sets action state to out-of-bounds strength values
4 participants