Interface HitResult

Result of a raycast or spatial probe against a chunked bitmap.

Coordinates are in world (bitmap) space; distance is in the same units.

interface HitResult {
    distance: number;
    materialId: number;
    x: number;
    y: number;
}

Properties

Properties

distance: number

Distance from the ray origin to the hit cell, in world units.

materialId: number

Material id of the cell that was hit.

x: number

World X of the hit cell.

y: number

World Y of the hit cell.