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
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
OUYA Game Development by Example

You're reading from   OUYA Game Development by Example An all-inclusive, fun guide to making professional 3D games for the OUYA console

Arrow left icon
Product type Paperback
Published in May 2014
Publisher
ISBN-13 9781849697224
Length 268 pages
Edition Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
John Donovan John Donovan
Author Profile Icon John Donovan
John Donovan
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

OUYA Game Development by Example Beginner's Guide
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
1. Experiencing the OUYA FREE CHAPTER 2. Installing Unity and the OUYA ODK 3. Diving into Development 4. Moving Your Player with Controller Input 5. Enhancing Your Game with Touch Dynamics 6. Saving Data to Create Longer Games 7. Expanding Your Gameplay with In-app Purchases 8. Polishing and Prepping Your Game for Deployment 9. Blazing Your Own Development Trail Pop Quiz Answers Index

Time for action – turning input into movement


We'll now use the input library you imported to capture data from the controller and translate it into movement that will be applied to our marble by performing the following steps:

  1. Create a Scripts folder in your Assets directory to store all of your script files, if you haven't already done so, then right-click on it and create a new C# script.

  2. Name the file MarbleInputManager and open it in your preferred code editor.

    Recall the Start and Update functions from Chapter 3, Diving into Development, which will already be present in the code file; we'll be using Update for most of this chapter.

  3. To link the code file with your marble, left-click and drag it onto the prefab you created or add it as a new script component using the Add Component button in the Inspector menu.

    You can also drag it onto the actual marble on the screen, but this will only apply the script to that instance of the prefab; adding the script to the prefab itself will cause all...

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