- Home /
Joystick buttons don't reset on application start
I've noticed if I hold down a joystick button on start (in the editor or windows complied), Input.GetButton("button") return false, until I release the button and then press it again. I'd expect it to be true if I'm holding it, including when the game loads.
Its like Unity doesn't poll the buttons on application run, and they all default to false.
Its a big problem as we have a custom joystick with a multi-position switch, the switch positions are bound to joystick buttons, and it might be that a switch position is pressing a button when my game loads. I have to toggle the switch before it engages properly.
I've tried Input.GetButtonUp("button"), again it doesn't trigger until I let go of the button, press it, and then let go again.
Am I missing something or is this a Unity bug?
Help is very much appreciated.
Answer by justaddice83 · Apr 08, 2015 at 01:42 PM
I managed to get to the bottom of this.
http://forum.unity3d.com/threads/unity-bug-issue-joystick-buttons-default-to-false.311550/
It is a Unity bug and its now been reported.
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
How to know if finger is on joystick if it is at horizontal & vertical zero 0 Answers
How to have multiple types of controller input using the input manager 0 Answers
How do you make a Main Menu that only takes Joystick input and is not affected by the Cursor 2 Answers
How do you properly deal with analog joystick input on multiple controller inputs? 1 Answer