# teleport-heading-ignored

> Talos 0.6 · Since 0.6

a tool's `POST /entity/{id}/teleport` gave the character the camera films a `yaw`, and two ticks later the view still faces more than 0.1 rad away from it: a behaviour wrote its own old heading back over the turn (`ctx.camera.set` with its yaw), so shots and uses aimed along the view still go the old way; said once per teleport, with the character as the `entity` and `teleport` as the `module`

| | |
|---|---|
| Severity | `warning` |

## Meaning

a tool's `POST /entity/{id}/teleport` gave the character the camera films a `yaw`, and two ticks later the view still faces more than 0.1 rad away from it: a behaviour wrote its own old heading back over the turn (`ctx.camera.set` with its yaw), so shots and uses aimed along the view still go the old way; said once per teleport, with the character as the `entity` and `teleport` as the `module`

## Fix

handle the `teleported` event in the behaviour that owns the camera's yaw; a wrapper of a built-in forwards its `onEvent` (`extendBehavior(base, { … })` does it for every hook it is not given)
