O'Reilly logo

Unity 3 Game Development HOTSHOT by Jate Wittayabundit

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating the rocket launcher and scope target

From the last section, we have the setup for the Aiming button to stop our character's movement as well as control the animation of our character by using crossFade() . In this section, we will add the aiming animation, shot animation, scope target UI, rocket launcher script, and rocket launcher object.

Engage Thrusters

We will start with creating a rocket launcher and adding the New3PSController script to it. Then, our character will be able to shoot the rocket:

  1. Go to Unity editor, GameObject | Create Empty, and name the object RocketLauncher, and then we drag this object inside the Main Camera object in the Hierarchy view as shown in the following screenshot:
  2. Then, go to the Inspector view of the RocketLauncher ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required