Book Image

Building an FPS Game with Unity

5 (1)
Book Image

Building an FPS Game with Unity

5 (1)

Overview of this book

Table of Contents (18 chapters)
Building an FPS Game with Unity
Credits
Foreword
About the Author
Acknowledgment
About the Reviewers
www.PacktPub.com
Preface
Index

Building our weapon – the mesh


Now that we have the resources to create the weapon, let's first get the mesh ready with a hand to hold it like in a normal FPS game.

  1. To start off, go to the UFPS/Base/Content/Prefabs/Weapons folder and drag the Pistol prefab out into the world. Move the object and camera until you get to the point where you can see it clearly.

    Note

    In case you need a refresher on the camera controls, here are the most commonly used ones:

    • Zoom In/Out: Alt + the right mouse button/scroll the middle mouse button up/down

    • Rotate Around Selected Object: Alt + the left mouse button

    • Panning: Alt + the middle mouse button

    Now, this is the fully created pistol we used previously that is already attached to a hand. We are going to use this pistol as a base to create our very own weapon by placing our new weapon where the old one is.

  2. From the Project tab, drag out the CQAssaultRifle file that we downloaded earlier (Assets/Close Quarters Assault Rifle/CQAssaultRifle) and bring it into the world...