API

Function MultiPick

  • Launch a ray to try 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

    • x: number

      X position on screen

    • y: number

      Y position on screen

    • Optionalpredicate: MeshPredicate

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

    • Optionalcamera: any

      camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used

    • OptionaltrianglePredicate: TrianglePickingPredicate

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

    Returns Nullable<PickingInfo[]>

    an array of PickingInfo