Documentation - v20.0.0-dev
    Preparing search index...

    Options of a ray query on the scene (Raycaster.intersect).

    interface SceneRaycastOptions {
        filter?: (object: SceneRaycastObject) => boolean;
        onlyFirst?: boolean;
        transparent?: boolean;
        viewportHeight?: number;
    }
    Index

    Properties

    filter?: (object: SceneRaycastObject) => boolean

    The objects hit: those it returns true for (e.g. by their owner, or their kind); the ray goes through the others, not raycast. Default: all.

    onlyFirst?: boolean

    Only the first hit (default true): the hit seen, or the first the filter keeps.

    transparent?: boolean

    Whether the parts drawn transparent are hit (default true): their opacity below the opaque one (settings.meshes.opaqueAbove), x-ray included. Without, the ray goes through them: the first hit is the first opaque part.

    viewportHeight?: number

    The height in pixels of the view the ray goes through (e.g. from the pointer): a line (of a part drawing lines) is then hit within the scene's settings.scene.lineThresholdPixels of it (see LineThreshold.fromCamera). Default: only a line the ray crosses.