Create Entrance Animation in Unity

Objective: write a code to make an enemy entrance animation when it is instantiated.

The first step is to make sure the enemy is out of the camera when we instantiate it. In this case a good position is 12 in the Y axis.

In the boss script in the method update I check if the position of the boss is higher than 3.5f (the position to start the fight) then I use the translate function to move the enemy down until he gets the 3.5f in the Y axis.

And that’s it!!! Enemy entrance animation ready.



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