O'Reilly logo

Unity Animation Essentials by Alan Thorn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating scene interactions

The sample scene we're creating here finally has two animation clips (button-push and door-open), and two animation controllers that define how the clips relate to states in a scene object. In the previous sections, the controllers have been configured with triggers so that for both the door and the button, their animations can be played back on demand, simply by activating the respective trigger. Now, the problem is that the player cannot activate the triggers themselves in the game. Only we, as developers, can do that using the Unity editor during play mode. Our aim now is to have the player press the button to open the door. This means that a button push should activate both triggers in the animation controllers: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required