Move In Direction
This behavior moves an agent according to its direction property. The agent will move in the x, y and z directions by the corresponding amounts* in the direction array.
Published by
Shortname
@hash/move_in_direction.rs
Description

This behavior moves an agent according to its direction property. The agent will move in the x, y and z directions by the corresponding amounts* in the direction array.

*Note this means that the direction array is not normalized.

Example

This agent will keep moving "south" until direction is modified:

const migratingAgent = {
    position: [6, 3],
    behaviors: ["move_in_direction"],
    direction: [0, -1]
}