> For the complete documentation index, see [llms.txt](https://docs.overthereality.ai/over-sdk-manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.overthereality.ai/over-sdk-manual/over-visual-scripting-legacy/nodes/operations/quaternion.md).

# Quaternion

### Description

The Quaternion nodes provide several operations, specifically used for handling quaternions.

{% hint style="info" %}
A quaternion is a vector with four parameters that represent a rotation.
{% endhint %}

#### Quaternion Exposer

This node is used to expose certain parameters and attributes of a given input Unity [Quaternion](https://docs.unity3d.com/ScriptReference/Quaternion.html), which are:

<table><thead><tr><th>Name</th><th width="204.3279424240331">Type</th><th width="340.1572968009442">Description</th></tr></thead><tbody><tr><td>x</td><td>Float</td><td>X component of the vector</td></tr><tr><td>y</td><td>Float</td><td>Y component of the vector</td></tr><tr><td>z</td><td>Float</td><td>Z component of the vector</td></tr><tr><td>w</td><td>Float</td><td>W component of the vector</td></tr></tbody></table>

<figure><img src="/files/VQsrnxmkn1smDVCsRafZ" alt=""><figcaption></figcaption></figure>

#### Base

This collection of Nodes are responsible for performing basic useful operations with quaternions.

<table><thead><tr><th width="204">Node</th><th>Description</th></tr></thead><tbody><tr><td>Angle</td><td>Calculates the angle, in degrees, between two rotations</td></tr><tr><td>Angle Axis</td><td>Creates a rotation which rotates angle degrees around axis</td></tr><tr><td>Dot</td><td>Dot Product of two rotations</td></tr><tr><td>Euler</td><td>Returns a rotation that rotates z degrees around the z axis, x degrees around the x axis, and y degrees around the y axis; applied in that order</td></tr></tbody></table>

<figure><img src="/files/zgNRAbskLkfDz0df6LbH" alt=""><figcaption></figcaption></figure>

#### Interpolation

This collection of Nodes allows for the implementation of interpolation between quaternions.

<table><thead><tr><th width="204">Node</th><th>Description</th></tr></thead><tbody><tr><td>Lerp</td><td>Interpolates between two rotations and normalizes the result afterwards</td></tr><tr><td>Sphere Lerp</td><td>Spherically interpolates between two rotations and normalizes the result afterwards</td></tr></tbody></table>

In both cases, the value `T` represents the value used for interpolation: if `T = 0` the result will be the first point, if `T = 1` the second.

<figure><img src="/files/W2scnblkhqq8JYvv5Vxx" alt=""><figcaption></figcaption></figure>

#### Math

This collection of Nodes allows for simple mathematical operations between quaternions.

<table><thead><tr><th width="204">Node</th><th>Description</th></tr></thead><tbody><tr><td>Quaternion Combine</td><td>Combines two rotations (i.e. applying the two rotations in sequence)</td></tr></tbody></table>

<figure><img src="/files/LuM8iRBvY0iOulEQB2D8" alt=""><figcaption></figcaption></figure>
