Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
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
Learning Android Game Development

You're reading from   Learning Android Game Development A Beginner's guide to developing popular Android games

Arrow left icon
Product type Paperback
Published in May 2017
Publisher Packt
ISBN-13 9781785880957
Length 238 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Nikhil Malankar Nikhil Malankar
Author Profile Icon Nikhil Malankar
Nikhil Malankar
Arrow right icon
View More author details
Toc

Learning about the 3D coordinate system

While making our 2D game, we were only dealing with x and y axis values. However, when you are making a 3D game, you have to deal with three axis values: x, y, and z. We're pretty much clear how our x and y axis values work by now. In a similar way, our z axis is projected on the front and back of our mobile device. The following image will explain the three axes in our 3D coordinate system better:

The positive x, y, and z axis on phone

The axes you see in the preceding image are positive directions. If you take their opposite sides, you will get negative values. The origin point starts from (0,0,0), and your values can be float values that will denote your object's location in 3D space.

Here's a classic problem that you might encounter while dealing with OpenGL in terms of device screen sizes. The grid in OpenGL assumes a screen, which is square...

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 €18.99/month. Cancel anytime