> For the complete documentation index, see [llms.txt](https://fehdead.gitbook.io/npc-kit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/lookatr.md).

# npc.lookatr

```lua
npc.lookatr(rotation)
```

|                         |                                                                         |
| ----------------------- | ----------------------------------------------------------------------- |
| id                      | `0x04BD`                                                                |
| arguments               | 1: Float                                                                |
| in NPC Kit              | yes                                                                     |
| measured from a kit NPC | returns                                                                 |
| waits                   | it has a wait handler: it can hold the script, and in `talk` the player |
| vanilla scripts         | 3 calls in 2 of 1114 scripts                                            |

## What it does

Turns the NPC's head to an angle from where its body faces, and holds the script until the head is there. The head stays at that angle until [lookatoff](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/lookatoff.md).

## Arguments

### `rotation` (Float)

The head's yaw from the body, in radians; `0` straight ahead, the sign picks the side. Vanilla uses it 3 times: `-0.785` (45°), `0.175` and `-0.175` (10°).

## Timing

Waits until the head has turned. It turns at the NPC's own head speed; for a set duration use [lookatrt](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/lookatrt.md).

## In NPC Kit

In the editor's Head group, live on the selected NPC.

## Used with

* [lookatrt](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/lookatrt.md): the same over a set number of frames.
* [lookatrt\_4c9](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/lookatrt_4c9.md): with a pitch too.
* [lookatoff](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/lookatoff.md): the head back to straight.

## Example

```lua
think = function()
    npc.lookatr(0.785);   -- the head 45° to one side; waits
    npc.wait(30);
    npc.lookatoff();
end,
```

## Pitfalls

* The angle is from the body: when the body turns, the head turns with it.
