# Object Forward and Up Vectors

## Object Forward and Up Vectors

In computer graphics and video game development, the Object Forward and Up vectors are unit vectors that describe the orientation of an object relative to its local coordinate system, also known as ObjSpace. These vectors have the following properties:

* They are unit vectors of length 1 with XYZ components each between 0 and 1.
* They are totally independent of object location.
* They match the world unit X and Z vectors after being given the object's rotation.
* The object LEFT vector matches the rotated world Y unit vector.
* They can be calculated with CrossProduct(UP, FORWARD).

In ObjSpace, FORWARD, LEFT, and UP are the XYZ unit vectors, which can work just like World Space but with the object position as the origin and XYZ coordinates as scalar displacements from the origin along the FORWARD, LEFT, and UP directions.

For instance, if an object has ObjSpace coordinates of {7, 8, 9}, then the relative world offset from the object is:

\= 7 + 8 + 9

The world coordinates are:

\+

To get those ObjSpace {XYZ} scalars, you can get the world offset:

\= -

Then, you can project the offset to ObjSpace units using DotProduct:

X = •

Y = •

Z = •

It is important to note that the Dot Product maps the offset to each object and returns a scalar for X, Y, or Z.

**Contributors**\
Captain Punch\
Shambullz (Yumudas)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.thescriptersguild.com/knowledge/scripting/guides-and-info/transforms/object-forward-and-up-vectors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
