Quantcast
Channel: Answers for "Is Input detection ok to do in fixedupdate?"
Viewing all articles
Browse latest Browse all 11

Answer by kubajs

$
0
0
Don't try to catch GetKeyDown/GetKeyUp/GetButtonDonw/GetButtonUp events in FixedUpdate as it will be quite often skipped. E.g. to check for jump in FixedUpdate method is bad idea. Also Update is called every frame and you usually want input detection tightly related to the current character or controlled object position. So it's reasonable to check input in Update as in this way you can be sure the movement is related to the current position in the current frame. FixedUpdate is not frame related and it might be called for instance once per 3 frames (it depends on the configuration and frame rate of course) or vice versa.

Viewing all articles
Browse latest Browse all 11

Latest Images

Trending Articles





Latest Images