- Home /
fast input and high fps
I want my game to react quickly to keyboard input. Graphics has a greate effect on Update fps, so I choose InvokeRepeating to run my logic(can I use FixedUpdate? Any suggestion?). Input of Unity is based on Update so I use GetAsyncKeyState to detect keyboard input(is there any batter solution?).
But the problem is even though logic fps is high, delta time of logic fps may be long, especially the frame I push keyboard. If every frame I push keyboard delta time is long, the game may feel lag. And the fps of InvokeRepeating is not exactly I set, but effect by Fixed Timestep. If I call InvokeRepeating("test", 0.001f, 0.005f), test will not run at 200fps, but if I change Fixed Timestep to a small number, It can be.Can anyone explain this to me? Thank you!
Your answer
Follow this Question
Related Questions
Help In Making a SphereCast for 3D Tire! Working RayCast Script included! 0 Answers
Why does this script make my camera jump when I move back? 1 Answer
World space GUI interaction with just a crosshair and a keyboard 0 Answers
inherit variable from another script 1 Answer
Mobile - button press while moving (First Person Controls) 0 Answers