What is the standard direction of a character relative to its own axis?
So I'm trying to set up 3D motion using C# code, and I think that the method I'm using to achieve that motion needs to have its reference set to the objects own space, not world space. The code works, kind of, but it seems like I'm not understanding the standard orientation of the objects axes.
is the characters forward motion always considered moving along the x axis when you look at the objects space, independent of the world axes?
Also, I'm trying to get my character to be able to look up and down. I've tried using the prefab FPS script that comes with unity 5.3.2, and it worked for all motion except for looking up and down. I tried changing the buttons/axes that correspond to that motion in the coding, and the best I could get was a weird tilt. The game started with the character tilted, and when I'd use the axis that was assigned for the up and down, it would only kind of flip the image, and it wouldn't do it smoothly. I think I can solve all of my issues by understanding what direction the character is facing relative to its own axes. JG
Answer by Glurth · Feb 24, 2016 at 06:17 AM
is the characters forward motion always considered moving along the x axis when you look at the objects space, independent of the world axes?
Most certainly can be, as long as you are consistent. Consider the character model: weather it is a person or a spaceship, the model has a front. What axis you used for this in your modeling software is rather arbitrary, but it's a good idea to always be consistent (standard is +Z = Vector3.foward= (0,0,1) ). Whichever-way the front faces, that is FORWARD in MODELSPACE. How you "transform" this model space into worldspace is what the object's (ad it's parents) "Transform" defines.
Will need more details to help with the axis stuff, if the above is insufficient.