Function PickWithRay
-
PickWithRay(
scene: Scene,
ray: Ray,
predicate?: MeshPredicate,
fastCheck?: boolean,
trianglePredicate?: TrianglePickingPredicate,
): Nullable<PickingInfo>Parameters
- scene: Scene
defines the scene to use for the picking
- ray: Ray
The ray to use to pick meshes
Optionalpredicate: MeshPredicatePredicate 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: booleandefines if the first intersection will be used (and not the closest)
OptionaltrianglePredicate: TrianglePickingPredicatedefines an optional predicate used to select faces when a mesh intersection is detected
Returns Nullable<PickingInfo>
a PickingInfo
- scene: Scene
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.