- Home /
Controller/keybord inputs delay/not responding
Hi guys,
I got a strange bug with my controllers. My game is playable with both keyboard and xbox 360 controller. Everything is ok but it seems like there is (sometimes) a delay between the input and the action in game. Sometimes, the action doesn't even appear. That's a lot frustrating..
All my movements and inputs are done in a FixedUpdate(), and I even placed those codes at the top of "script execute order".
Does anyone got an idea about the origine of this problem ?
http://docs.unity3d.com/Documentation/ScriptReference/Input.html
Note also that the Input flags are not reset until "Update()", so its suggested you make all the Input Calls in the Update Loop.
Answer by fuego_see_money · Jun 30, 2015 at 09:52 PM
I know this is late (its 2015), but the problem would be that your input is in FixedUpdate()
- you should split your code up so that the input is done in Update()
, because Update()
runs more frequently per second, which means it will get the input quicker than FixedUpdate()
, which will sometimes register the input a couple frames slower than Update()
.