Game Development Reference
In-Depth Information
What does it do?
We will start with applying the built-in CharacterMotor , FPSInputController ,
and MouseLook scripts from the built-in FPS character controller. Then, we will add
the character model and start creaing a new script by adaping part of the code in the
FPSInputController script. Then, we will be able to control the animaion for our
character to shoot, walk, run, and remain idle.
Next, we will create a rocket prefab and the rocket launcher script to fire our rocket. We will
use and adapt the built-in explosion and ire trial paricle in Unity, and atach them to our
rocket prefab. We will also create a new smoke paricle, which will appear from the barrel of
the rocket launcher when the player clicks Shoot .
Then, we will create the scope target for aiming. We will also create the launcher and smoke
GameObject , which are the start posiion of the rocket and the smoke paricle.
Finally, we will add the rocket GUITexture object and script to track the number of bullets
we have left, after each shot. We will also add the Reload buton to reill our bullet when the
character is out of the bullet.
Why Is It Awesome?
When we complete this chapter, we will be able to create the third-person shooter style
camera view and controller, which is very popular in many games today. We will also be able
to create a rocket launcher weapon and paricle by using the prefab technique. Finally, we
will be able to create an outline text with the GUITexture object for tracking the number of
bullets left.
Your Hotshot Objectives
In the last chapter, we already talked about how to create a third-person controller script to
control our character. In this chapter, we will use a similar concept and combine it with the
built-in first-person controller prefab style to create our third-person shooter script to fire a
rocket from the rocket launcher. Here is what we will do:
F Seing up the character with the irst-person controller prefab
F Creaing the New3PSController and MouseLook_JS scripts
F Create a rocket launcher and a scope target
F Create the rockets and paricles
F Create the rocket bullet UI
 
Search WWH ::




Custom Search