Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Building an FPS Game with Unity

You're reading from  Building an FPS Game with Unity

Product type Book
Published in Oct 2015
Publisher
ISBN-13 9781782174806
Pages 326 pages
Edition 1st Edition
Languages

Table of Contents (18) Chapters

Building an FPS Game with Unity
Credits
Foreword
About the Author
Acknowledgment
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started on an FPS 2. Building Custom Weapons 3. Prototyping Levels with Prototype 4. Creating Exterior Environments 5. Building Encounters 6. Breathing Life into Levels 7. Adding Polish with ProBuilder 8. Creating a Custom GUI 9. Finalizing Our Project Index

Customizing our weapon's properties


Now, it's great that the weapon looks like our new weapon, but it fires and moves exactly like a pistol. In this section, we are going to modify the properties of our weapon to give it the behavior we want by using the following steps:

  1. Now, let's start off by switching over to the Game tab and unchecking the Maximize on Play option if it is currently enabled so we can still access the Inspector while the game is being played. We will play the game and press 5 to bring out our weapon.

    It's important to note that while the game is being played, any changes we've made would be undone when we exist; but we can get around this by copy/pasting the component values.

  2. Press Enter to return the control to your mouse. Then, from the Hierarchy tab, select the weapon, which can be found in AdvancedPlayer | FPSCamera | 5CQ AssaultRifleTransform | 5CQ Assault Rifle.

  3. Now, with the object selected, move down to the Vp_FP Weapon (Script) component and extend the Position Springs...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}