API

Function PickWithRay

  • Use the given ray to pick a mesh in the scene. A mesh triangle can be picked both from its front and back sides, irrespective of orientation.

    Parameters

    • scene: Scene

      defines the scene to use for the picking

    • ray: Ray

      The ray to use to pick meshes

    • Optionalpredicate: MeshPredicate

      Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must have isPickable set to true. thinInstanceIndex is -1 when the mesh is non-instanced

    • OptionalfastCheck: boolean

      defines if the first intersection will be used (and not the closest)

    • OptionaltrianglePredicate: TrianglePickingPredicate

      defines an optional predicate used to select faces when a mesh intersection is detected

    Returns Nullable<PickingInfo>

    a PickingInfo