Make with the shooting already
We are going to waste no time and get our marine rootin', tootin', and shootin'. Or at least shootin'. Similar to the turret, we're going to use a LineRenderer for the blaster beam. Here's what to do.
Preparing to Shoot
First, we will create some components that are part of the shooting process:
- Open the marine prefab in your
Prefabs
folder. - In the Hierarchy, find the
muzzle
game object you created right in the middle of the marine's chest. Be sure you have created a Muzzle tag (capital M) and applied it to your object: - Next, go ahead and add a LineRenderer to the muzzle.
Whoa! You'll see a lot of magenta going on. This is because the component doesn't have a material assigned to it.
- In your
Materials
folder, create a new material calledmarine laser MAT
. Be sure to have Shader set to Unlit/Color: