Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Oculus Rift Development

You're reading from   Mastering Oculus Rift Development The next frontier of gaming and simulation

Arrow left icon
Product type Paperback
Published in Feb 2017
Publisher Packt
ISBN-13 9781786461155
Length 306 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Jack Donovan Jack Donovan
Author Profile Icon Jack Donovan
Jack Donovan
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Exploring a New Reality with the Oculus Rift 2. Stepping into Virtual Reality FREE CHAPTER 3. Improving Performance and Avoiding Discomfort 4. Interacting with Virtual Worlds 5. Establishing Presence 6. Adding Depth and Intuition to a User Interface 7. Hearing and Believing with 3D Audio 8. Adding Tone and Realism with Graphics 9. Bringing Players Together in VR 10. Publishing on the Oculus Store

Creating custom Unity input axes

So far, you've coded your own input and used predefined axes in Unity's InputManager, but you haven't yet defined your own axis. In this section, we'll do this by adding a new axis called Reset, which we'll tie in with a dummy manager to find all practice dummies in a scene and set all of their nodes back to red.

Open the InputManager again by mousing over Project Settings in the Edit menu and selecting Input. Click on in the Size field directly beneath Axes and add one to the total count; in the following screenshot, we had 26 axes, so we updated it to 27:

Creating custom Unity input axes

Now, scroll to the bottom of the list of axes and you'll see a duplicate of whatever the last axis was at the end of the list. When you create a new input axis, it will automatically be assigned all of the same values that the last one had, but we'll be replacing these values to make it unique.

Expand the final input axis in the list and rename it Reset, as shown in the...

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
Banner background image