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

[3.x] Input: Fix just pressed and released with short presses #77040

Merged
merged 1 commit into from
Jun 13, 2023

Conversation

lawnjelly
Copy link
Member

@lawnjelly lawnjelly commented May 13, 2023

Previously if an action was both pressed and released on the same tick or frame, is_action_just_pressed() would return false, resulting in missed input.

This PR separately the timestamp for pressing and releasing so each can be tested independently.

Fixes #73339
3.x version of #77055 (see that PR for details)

Notes

  • This PR should hopefully be identical to master (barring name changes, process becomes idle in 3.x).
  • There is actually one other small case I'd like to improve further in master and 3.x, but would prefer in a separate PR as easier to review.

@lawnjelly lawnjelly added this to the 3.6 milestone May 13, 2023
@lawnjelly lawnjelly requested review from a team as code owners May 13, 2023 19:04
@lawnjelly lawnjelly marked this pull request as draft May 13, 2023 19:05
@lawnjelly lawnjelly changed the title [WIP] [3.x] Input - fix just pressed and released with short presses [3.x] Input - fix just pressed and released with short presses May 14, 2023
@lawnjelly lawnjelly marked this pull request as ready for review May 14, 2023 07:40
@lawnjelly lawnjelly marked this pull request as draft June 9, 2023 13:13
Previously if an action was both pressed and released on the same tick or frame, `is_action_just_pressed()` would return false, resulting in missed input.

This PR separately the timestamp for pressing and releasing so each can be tested independently.
@lawnjelly lawnjelly marked this pull request as ready for review June 12, 2023 15:40
@akien-mga akien-mga merged commit da35288 into godotengine:3.x Jun 13, 2023
@akien-mga
Copy link
Member

Thanks!

@lawnjelly lawnjelly deleted the input_just_pressed branch June 13, 2023 12:50
@akien-mga akien-mga changed the title [3.x] Input - fix just pressed and released with short presses [3.x] Input: Fix just pressed and released with short presses Aug 16, 2023
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.

2 participants