Enemies: Creating the Astroid behavior | Unity 2D
Jul 1, 2021
Objective: Create a rotating effect for our Astroid.
After placing the Astroid into our scene, make it prefab and create a new script for it. I’m calling mine simply, ‘Astroid’.
To make it rotate, let’s check out how to do this by reviewing the Unity Documentation.
From the above highlighted, we will use just that. In my Astroid script in the update method I will place the below line of code:
We now have the desired rotating effect: