- Home /
Facing of game objects?
Hey guys, this may seem like a stupid question but.. How do I tell which way is the "front" of a game object?
Answer by GesterX · Feb 10, 2011 at 07:24 AM
The z-axis is considered "forward" (aka the front of the object) so moving an object along it's z-axis is considered to be moving it forward. This is the blue arrow in the Unity scene editor.
Just for the sake of clarity, I'll mention that you can actually make whatever axis you want be the forward axis. For example, there'd be nothing stopping you from making a 2-d game viewed from above, and making 'x' the forward axis for the entities in the game.
Jesse, that didn't make it clearer (though, your answer is probably more complete).
If you use "transform.LookAt()" in one of the object's script, then the object will "look" (i.e. face whatever location follows in brackets) along its Z axis.
If you are "free to make whatever axis you want be the forward axis" then you probably know enough not to be asking this question. For the neophyte, the simple, non-confusing answer is the Z axis, in a positive direction.
Answer by Justin Warner · Feb 10, 2011 at 04:46 AM
Make sure that the top, it says Local, and not world, if it says World, than click it to change to local. Click on the game object, and then check which way the X arrow is pointing (red I believe).
Should work, and have a good night!
x? no. Basically you can define your own front but in Unity z-axis if front or forward. Up is y-axis and x-axis is right