> For the complete documentation index, see [llms.txt](https://scripting.breeze.rip/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scripting.breeze.rip/newgen/api/functions/math.directionfromrotation.md).

# math.directionFromRotation

> **directionFromRotation**(`yaw`, `pitch`): [`Vec3`](/newgen/api/net/minecraft/world/phys/vec3.md)

The unit vector a rotation looks along.

### Parameters

#### yaw

`number`

The yaw.

#### pitch

`number`

The pitch.

### Returns

[`Vec3`](/newgen/api/net/minecraft/world/phys/vec3.md)
