Interact
Interact(
props):Element|null
Shows prompt above the entity while the body of one of the player’s
entities its targets name, by default the player’s character, is near.
Fires onInteract once on each press of the E key, however long it is
held, or once the character comes into reach
after a click on the entity where the camera walks the character to a
click. Of several in reach, the prompt shows and the key fires only the
one the room chose for the player, the nearest, the one the character
faces winning a tie. The press goes to the room through that entity. The
player’s page measures the player’s own entities and fires its own prop;
the room’s trait marks any target near and carries no callback.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
props |
InteractProps |
Returns
Section titled “Returns”Element | null