Game Development Reference
In-Depth Information
Fig 2.4 Vectors in the Unity 3D environment.
the orientation is dependent on the camera's orientation. Each game
object has its own local orientation depicted by a set of axes appearing
in the Scene when the object is selected. So while the y axis for the world
may be vertical in a scene, it could be horizontal locally for an object that
is lying down.
In Unity, there are two vector classes: Vector2 and Vector3. A game
object's position, rotation, and scale values are stored as Vector3. Vector2
is useful for storing 2D vector information.
A game object also has a vector for each of its x , y , and z axes: Vector3.left,
Vector3.up, and Vector3.forward, respectively. These are useful for moving
an object along its axes without needing to know its orientation.
On the Web Site
Vector2 and Vector3 Class Definitions
Detailed information about the Unity vector classes can be found in
the Script Reference here:
ScriptReference/Vector2.html and
documentation/ScriptReference/Vector3.html .
Search Nedrilad ::

Custom Search