The mouse button has two values, true or false, the gamepad rear bumper has a float values between 0 and 1. How do I map those to the same action, with the new system?
I’ve forgotten how things worked in the prototype, but in the system we’re developing, all buttons are backed by a float value, so the only difference between a digital button and analog button is that the digital ones will always only have the values 0 or 1. You can also query isHeld, wasJustPressed, and wasJustReleased, regardless of whether it’s a digital or analog button.
This sounds lovely. Is .wasJustPressed the same as the legacy GetButtonDown?
Yeah. Unfortunately there’s no single words that are unambiguous. It was not clear if GetButtonDown meant is held down or has just been pressed. We tried to make the new properties more clear.
Yes this is clearer.
How long does this signal last? Let’s say I query this in Update, the game drops frames… Or I query it from FixedUpdate and Update, when does it get consumed?
.wasJustPressed and .wasJustReleased will be true for exactly one Update and one FixedUpdate. We keep track of things separately for Update and FixedUpdate to ensure it works correctly for both.
This is great!
I think this is the first time I know exactly how long events last ![]()
In your new input available in any of the recent releases?
No, we will make it clear in this forum (and probably a blog post) when it’s available.