Documentation - v19.16.0-dev
    Preparing search index...

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

    interface SceneRaycastOptions {
        filter?: (hit: SceneHit) => boolean;
        onlyFirst?: boolean;
        viewportHeight?: number;
    }
    Index

    Properties

    filter?: (hit: SceneHit) => boolean

    The hits kept: those it returns true for (e.g. of some objects, read in hit.mesh or hit.sprite); the ray goes through the others. Default: all. Applied to the hits of the query, after the Raycaster's cache: callers filtering differently share them.

    onlyFirst?: boolean

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

    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.