
However, we still have no way of knowing how long we have left to perform the QTE - so let's fix that now. Our new Hit animation should play every time we press the correct button. Set the Default state as the default, so that none of the others play until they're supposed to. Either way, add one more state called Default. If they don't already exist, create Win and Lose states. Whether or not we also make Win and Lose, we still need states with these names to be present. Now open the QTE_Canvas's Animator window, and check that Hit is present. If you want to create Win and Lose animations as well, now is the time to do so.Īpply the changes to the QTE_Canvas prefab, and remove the local instance from the scene. Once finished, select the Hit animation asset, and uncheck Loop time. Tutorials on working with animation in Unity can be found here. Quickly shrinking the Image, then returning it to it's original state, will do just fine. Drag an instance of the QTE_Canvas prefab into your scene, open the Animation window, and create a new clip called Hit.Ĭreate a brief animation that informs the player that they've pressed the correct button. Let's create a "hit" animation that plays whenever the player presses the "Down" button. Create and assign a new Animation Controller asset for it: Now return to the QTE_Canvas prefab, and attach an Animator component to it.

An info box will appear, describing the Animation Controller that our UI Canvas must have:

Return to the Input: QTE Action we created, and check Animate UI?. This time, we'll improve the look of the prompt that appears on-screen - giving some nice animation and visual feedback. In the last tutorial, we created a Quick Time Event that had the player button-mashing his way to a friendly message - else the game quits.
