# id

Album created by
• 1
• 0
• 0

## 1 image

There are no comments to display.

## Create an account

Register a new account

• ### Gallery Statistics

• Images
9093
389
• Albums
2250

Latest Image
0
By Znippy,

• That sounds pretty close actually, but here:
Check it out.
• That makes perfect sense! Thank you
So for your compass, did you do something like tell the game "This point here (N) is 0" and then compared anywhere the player was facing to that point to dictate the angles? Then like assigned SE NW SW etc to certain ranges?
• That's where the world/local business comes into play.  A character(or camera) x,y,z is always relative to their position/orientation(in unity the player's +z is it's forward direction, the +y is UP, etc...)
But the WORLD x,y,z is set in/by the engine.  If a camera is facing the world +Z direction and turns around it's now facing the the World -Z direction.  But it's local +Z is still its forward direction.
• Its all relative I see! So do you set that up? Like can you say 'Make them relative to my camera' and then whenever you turn around Z will always be opposite your camera? Or would Z just become -Z in the 3D world for that?
• It's relative, that's where the confusion comes in.
X could be width
Y could be height
Z could be depth
But if you rotate the camera another direction.. Which one is now depth?
So, it's just x,y, and z.  The assignment of width,height, and depth is merely a function of perspective, never really an absolute.
Everything is relative to something, in most games that relation is expressed in terms of the camera angle, or the alignment of the player to the terrain, or the built in settings of the engine you're using(Unity uses Z for Forward(depth) and Y for UP(height).)
Ultimately, the computer just sees x,y,z and knows that that defines a 3D space, and you (can) move those to whatever orientation you like to work with/makes the most sense for your situation.
×

## Important Information

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!