Freeze Animation in Unity

Stop the security camera animation.

Objective: make a script to stop the security camera animation when the player is caught.

In this case a just went to the security camera script, declared a variable to get the reference to the animator component and added a line in the coroutine to set the value of the properti “enabled” as false. This makes the animator stop completely so the animation is going to freeze.

And that’s it!!! When the player reaches the security camera it stops.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Rusben Guzman

A Software Engineer passionate about game dev and interactive products with Unity. I consider video games to be the artistic expression of programming.