Small World Engine API Reference - v0.76.20
    Preparing search index...

    Class GridMovementBehavior

    A behavior that moves an object strictly along orthogonal axes (X or Z) and evaluates grid intersections to allow for perfect 90-degree turns.

    Hierarchy (View Summary)

    Index
    direction: Vector3D
    gridSize: number
    isActive: boolean = true
    onGridIntersection?: (
        currentPosition: Vector3D,
        currentDirection: Vector3D,
    ) => Vector3D | null
    speed: number
    target: CameraInterfaceData | Object3D | undefined = undefined

    The object this behavior is attached to. Set automatically.

    uuid: string = ...
    inspector?: Record<string, InspectorField>