L
L
lautlander2021-02-13 18:23:23
Unity
lautlander, 2021-02-13 18:23:23

Pressing the GetKeyDown(KeyCode.LeftShift) button does not always work, what should I do?

if(Input.GetKeyDown(KeyCode.LeftShift)){
            controll_changed=!controll_changed;
        }


Sometimes it activates the first time, but usually you need to poke it several times to work. This is confusing.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2021-02-13
@lautlander

Don't use it in FixedUpdate

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question