Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Unity Game Development Blueprints

You're reading from   Unity Game Development Blueprints Explore the various enticing features of Unity and learn how to develop awesome games

Arrow left icon
Product type Paperback
Published in Nov 2014
Publisher
ISBN-13 9781783553655
Length 318 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
John P. Doran John P. Doran
Author Profile Icon John P. Doran
John P. Doran
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. 2D Twin-stick Shooter 2. Creating GUIs FREE CHAPTER 3. Side-scrolling Platformer 4. First Person Shooter Part 1 – Creating Exterior Environments 5. First Person Shooter Part 2 – Creating Interior Environments 6. First Person Shooter Part 3 – Implementing Gameplay and AI 7. Creating Save Files in Unity 8. Finishing Touches 9. Creating GUIs Part 2 – Unity's New GUI System Index

Using controller input


One of the biggest advantages of using Unity as a game engine is the fact that you can support multiple platforms with minimal changes to your base game. In fact, right now, if you plug in an Xbox 360 Controller into your computer, restart Unity, and then try to play the game, you'll notice that the left-hand side joystick already moves the player, and if you press the Y button, you will jump into the air. However, some of the aspects don't work, so let's get them implemented.

Let's get started by performing the following steps:

  1. The first thing that we're going to need to do is let Unity know that we want to work with some new input. So, to do that, we will need to navigate to Edit | Project Settings | Input. Have a look at the following screenshot:

  2. Once there, we need to add four new axes to our project, the first being a new horizontal axis; so right-click on the Mouse X axis, and select Duplicate Array Element.

  3. Extend the newly created Mouse X axes, and rename it to...

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 $19.99/month. Cancel anytime