Book Image

Unity 5.x Game Development Blueprints

By : John P. Doran
Book Image

Unity 5.x Game Development Blueprints

By: John P. Doran

Overview of this book

<p>This book will help you to create exciting and interactive games from scratch with the Unity game development platform. We will build 7-8 action-packed games of different difficulty levels, and we’ll show you how to leverage the intuitive workflow tools and state of the art Unity rendering engine to build and deploy mobile desktop as well as console games.</p> <p>Through this book, you’ll develop a complete skillset with the Unity toolset. Using the powerful C# language, we’ll create game-specific characters and game environments. Each project will focus on key Unity features as well as game strategy development. This book is the ideal guide to help your transition from an application developer to a full-fledged Unity game developer</p>
Table of Contents (19 chapters)
Unity 5.x Game Development Blueprints
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Preface
Index

Creating our weapon


Now, with a traditional first-person shooter, we shoot a bullet from a gun to damage enemies. However, we will create a camera that will take pictures to damage enemies.

Creating our camera

Now before we can shoot anything, we need to make our camera, and to do this, we are going to create another camera object that is zoomed in and then give it a border to look more realistic. To show how easy it is to do, let's get started! Perform the following steps:

  1. The first thing we need to do is go to the flashlight Spotlight object we created earlier. So, with it selected, double-click on it to center the camera on it.

  2. Our camera weapon is going to be another object, which will be a child of the FirstPersonCharacter object. To do this, first select the FirstPersonCharacter object that is located on our FPSController object and then right-click on it from the Hierarchy and then select Create Empty. Also, in the Inspector section for this newly created object, confirm whether the object...