---
name: ferret-interaction-zones
description: Use for usable things and named areas in a Ferret level: Interactor and Interactable, Door, LevelDoor, Lever, Pickup, Inventory, installInteraction; and ZoneService with enter/exit events and zoneHash. Read when a prompt does not show or a zone does not fire.
---

# Interaction and zones

## When to use
Doors, levers, pickups, inventories, "enter this area" triggers.

## The model
`Interactor` on the player picks the usable thing in front of it each step and shows its prompt; `Interactable` is the base. On top: `Door`, `LevelDoor` (using it calls `travel`), `Lever` (flips and toggles the doors it points at), `Pickup`, `Inventory`. `installInteraction(world)` registers them so manifests can name them. `ZoneService` keeps named zones on a grid; a member is in **exactly one** zone at a time; events on enter and exit. `zoneHash` gives the name a backend sees.

## Steps
1. `installInteraction(world)`; add `Interactor` to the player.
2. In the manifest: entity `{ node, behaviour: "Door", params: { slide: [0, 2.4, 0] } }`, pickups with `item`.
3. Zones: manifest `zones` (names, shapes) or the editor commands `edit.zone.*`.
4. Listen to the zone events for ambient sound, voice rooms, transformations.

## Check afterwards
Walk up to each usable: prompt appears (UI `setPrompt`), use works with action A/Enter; a zone fires once on enter and once on exit.

## What usually goes wrong
- No `ZoneService` added to the world: zones silently do nothing.
- Overlapping zones: a member belongs to one; use `priority`.
- The player lacks `Interactor`, or the usable is out of range or not in front.

## Files

- `reference/packages.md` — Characters, animation graphs, NPC navigation, interactables, zones and transformations.
- `reference/api-interaction.md` — every export of `@ferret/interaction` with signature and doc comment
- `reference/api-zones.md` — every export of `@ferret/zones` with signature and doc comment
