Function PickWithBoundingInfo
-
PickWithBoundingInfo(
scene: Scene,
x: number,
y: number,
predicate?: MeshPredicate,
fastCheck?: boolean,
camera?: any,
): Nullable<PickingInfo>Parameters
- scene: Scene
defines the scene to use for the picking
- x: number
position on screen
- y: number
position on screen
Optionalpredicate: MeshPredicatePredicate function used to determine eligible meshes. 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
OptionalfastCheck: booleandefines if the first intersection will be used (and not the closest)
Optionalcamera: anyto use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used
Returns Nullable<PickingInfo>
a PickingInfo (Please note that some info will not be set like distance, bv, bu and everything that cannot be capture by only using bounding infos)
- scene: Scene
Launch a ray to try to pick a mesh in the scene using only bounding information of the main mesh (not using submeshes)