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

    Class Raycaster

    Casts rays into the scene to pick or select objects.

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    ray: Ray = ...

    The internal mathematical ray used for casting.

    Methods

    • Tests the ray against a list of objects. Currently uses fast AABB (BoundingBox) intersection.

      Parameters

      • objects: Object3D[]

        The objects to test against.

      • sort: boolean = true

        If true, the results are sorted by distance (closest first).

      Returns Intersection[]

      An array of intersections.