Freeze Animation in Unity

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.

--

--

--

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

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

[How-to] Request IT Inventory Stock In AssetSonar

[How-to] Request IT Inventory Stock In AssetSonar

A Completely FREE planning poker app

Setting up a simple CI/CD with Django, Gitea, Jenkins, and of course, Docker!

Agile and Scrum, Work like a Charm✨

Restoring an MSSQL DB Running Docker Using Linux… on a Mac

Comparing Images

KUBERNETES COMPONENTS

Tic Tac Toe Game — Ruby style CLI

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

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.

More from Medium

Creating A Respawn/Checkpoint System In Unity

Creating a Keystore File within Unity

OnClick Event in Unity

nitCreating Collectables in Unity