rednode API - v0.80.1
    Preparing search index...

    Interface PickOptions

    Options for world.pick.

    interface PickOptions {
        all?: boolean;
        dir?: WorldPoint;
        from?: WorldPoint;
        groups?: string[];
        helpers?: boolean;
        kinds?: string[];
        limit?: number;
        max?: number;
        order?: "fit" | "nearest";
        physics?: boolean;
    }
    Index
    all?: boolean

    Also nodes not streamed in now. Default false.

    Which way it goes. Default: where the camera looks.

    from?: WorldPoint

    Where the ray starts. Default: the camera.

    groups?: string[]

    The collision groups the physics line is cast over; the nearest hit across them wins, and physicsHit.group names it. Default ["Static"]. Objects baked by EDGEbuilder are in "Dynamic", which a "Static" line passes through. Only the game's own group names are taken (Static, Dynamic, Terrain, PlayerBlocker, Vehicle, Water and the rest; another is refused with the list). Each group costs one more ray cast; at most 8. Since REDnode 0.71.0.

    const { hits, physicsHit } = await world.pick({ groups: ["Static", "Terrain", "PlayerBlocker", "Dynamic"] });
    console.log(physicsHit?.group, hits.find((h) => h.holdsHit)?.kind);
    helpers?: boolean

    Also stand-ins and invisible helpers: distant LOD proxies (terrain, roads, prefabs, entities), occluders, collision, smart objects, GI spaces and shapes. Default false.

    kinds?: string[]

    Only these node classes, such as ["worldMeshNode", "worldInstancedMeshNode"].

    limit?: number

    How many hits to answer, nearest first. Default 20.

    max?: number

    How far, in metres. Default 50.

    order?: "fit" | "nearest"

    "fit" (the default): with a collision hit, the nodes whose box holds the hit point first, the smallest box first (what was aimed at, rather than the road or terrain piece the ray starts inside), then the rest by distance. "nearest": by distance only.

    physics?: boolean

    Also cast against the static collision, so each hit says whether its box holds that point. Default true.