Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PickingInfo

Information about the result of picking within a scene

see

https://doc.babylonjs.com/divingDeeper/mesh/interactions/picking_collisions

Hierarchy

  • PickingInfo

Index

Properties

aimTransformSearch playground for aimTransform

aimTransform: Nullable<TransformNode>

The aim-space transform of the input used for picking, if it is an XR input source.

buSearch playground for bu

bu: number

(See getTextureCoordinates) The barycentric U coordinate that is used when calculating the texture coordinates of the collision.

bvSearch playground for bv

bv: number

(See getTextureCoordinates) The barycentric V coordinate that is used when calculating the texture coordinates of the collision.

distanceSearch playground for distance

distance: number

Distance away where the pick collided

faceIdSearch playground for faceId

faceId: number

The index of the face on the mesh that was picked, or the index of the Line if the picked Mesh is a LinesMesh

gripTransformSearch playground for gripTransform

gripTransform: Nullable<TransformNode>

The grip-space transform of the input used for picking, if it is an XR input source. Some XR sources, such as input coming from head mounted displays, do not have this.

hitSearch playground for hit

hit: boolean

If the pick collided with an object

originMeshSearch playground for originMesh

originMesh: Nullable<AbstractMesh>

If a mesh was used to do the picking (eg. 6dof controller) as a "near interaction", this will be populated.

pickedMeshSearch playground for pickedMesh

pickedMesh: Nullable<AbstractMesh>

The mesh corresponding the the pick collision

pickedPointSearch playground for pickedPoint

pickedPoint: Nullable<Vector3>

The location of pick collision

pickedSpriteSearch playground for pickedSprite

pickedSprite: Nullable<Sprite>

If a sprite was picked, this will be the sprite the pick collided with

raySearch playground for ray

The ray that was used to perform the picking.

subMeshFaceIdSearch playground for subMeshFaceId

subMeshFaceId: number

The index of the face on the subMesh that was picked, or the index of the Line if the picked Mesh is a LinesMesh

subMeshIdSearch playground for subMeshId

subMeshId: number

Id of the the submesh that was picked

thinInstanceIndexSearch playground for thinInstanceIndex

thinInstanceIndex: number

If we are picking a mesh with thin instance, this will give you the picked thin instance

Methods

getNormalSearch playground for getNormal

  • getNormal(useWorldCoordinates?: boolean, useVerticesNormals?: boolean): Nullable<Vector3>
  • Gets the normal corresponding to the face the pick collided with

    Parameters

    • Optional useWorldCoordinates: boolean

      If the resulting normal should be relative to the world (default: false)

    • Optional useVerticesNormals: boolean

      If the vertices normals should be used to calculate the normal instead of the normal map

    Returns Nullable<Vector3>

    The normal corresponding to the face the pick collided with

getTextureCoordinatesSearch playground for getTextureCoordinates

  • Gets the texture coordinates of where the pick occurred

    Returns Nullable<Vector2>

    the vector containing the coordinates of the texture

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method