Making An Asteroid Shoot Towards The Player!
Apart from the enemy spaceships, I want some more dangerous things in my game. Let’s make some Asteroids to avoid!
Jul 24, 2021
Today’s Objective: Create an asteroid that spawns occasionally, shoots towards the player from a random angle, and the player must avoid otherwise they will die with 1 hit.
First, the prefab:
Create a new 2D Sprite GameObject called “Shooting Asteroid”. I’m going to use the same movement script as my enemy ships, since its mostly identical code, but add some modifications.