-
-
Notifications
You must be signed in to change notification settings - Fork 933
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
Rename "Down" input methods for clarity from "Pressed" (e.g. IsKeyDown, IsMouseButtonDown etc.) #2287
Comments
Having thought about this myself a while back, I didn't reach quite your conclusion. I think adding 'Held' would be nice to have but not remove 'Down'. The states I think are of interest are:
But there's two more other states to think about:
So, 'Down' would actually mean either 'Pressed' or 'Held'. Though to be honest, I'm not really sure if I can think of a scenario where you really need to know if a button is 'held' (ie both previous frame & current frame down), I'm sure someone can point out a situation though. |
I prefer Maybe Unity has this naming scheme:
Godot:
Bevy:
UE is all event based, so not really applicable here. |
I would agree, not that useful and may introduce unexpected and unwanted behavior. Though was worth bringing up still I think.
I have always really disliked Unity's
Adding the A note on how the input actually works right now. |
|
My personal preference is press/release naming in line with John Carmack's description on UI design: And then "Down" would refer to the current state of the key, whether it is "down" or not. I also believe that this naming convention translates well to analogue keyboards. |
Is your feature request related to a problem? Please describe.
It is difficult to keep straight which behavior the "Down" and "Pressed" input methods perform.
Describe the solution you'd like
Rename all occrances of
Down
toHeld
in the input related classes/interfaces/structs.And mark existing public members that use
Down
in their name as obsolete.Additional context
Considered renaming to
Pressing
instead ofHeld
, but it would be the reverse of how events are normally called. Normally it isLoading
>Loaded
, so havingPressed
>Pressing
I feel adds more confusion. AndPressed
>Held
>Releases
feels intutive to me. Open to other name ideas though.The text was updated successfully, but these errors were encountered: