walkTo
walkTo(
writer,destination,character?):WalkToResult
Sends a character walking to destination round whatever the navmesh was
baked with, dropping wherever it was walking before.
Returns the route it was sent along, or a WalkRefusal saying why it was
not. A refused walk changes nothing: the character keeps the path it had, so
a click into the sky leaves a walk under way alone rather than cancelling
it, and a routine that wants the character stopped clears its path itself.
An end that snaps with no route to it is no refusal: the route runs as far
as it goes, partial says so, and the character walks it and stops, the
nearest it can get to what was asked for.
The character sent is this side’s player’s character unless one is named, as
a room names each player’s own. It walks the character on this world alone.
A page in a room sends the walk to the room with the walk command,
sendCommand(world, characters.commands.walk, { to }, { entity }), whose
reader calls this on the player’s page and on the room on the same tick.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
writer |
PredictedWriter |
destination |
ReadonlyVector3 |
character? |
Entity |