- Home /
Killing keyboard input until cutscene has played.
I have an intro camera flyover that plays at the start of a level. However, if the player presses any key, it instantly skips to game play.
How can I inhibit keyboard input until my camera move has completed?
Answer by Jesus_Freak · Dec 27, 2010 at 03:43 PM
You could make a Boolean and make input allowed only when it's true, that's what I do.
Answer by Justin Warner · Dec 27, 2010 at 03:19 PM
function Awake () {
yield cameraAnimation;
}
I don't know for a fact if that'd work, but you can always disable the scripts on the player for whatever amount of time in the update function. Use GetComponent, and just .enable = false on them, and then he cant move, then do the yield above, or just WaitForSeconds(5), and then you can just have him be able to move 5 seconds after....
Good luck!
Your answer
![](https://koobas.hobune.stream/wayback/20220613092720im_/https://answers.unity.com/themes/thub/images/avi.jpg)