PickingInfo

Information about the result of picking within a scene

see

https://doc.babylonjs.com/babylon101/picking_collisions

Hierarchy

  • PickingInfo

Index

Properties

bu

Find examples in Playground
bu: number

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

bv

Find examples in Playground
bv: number

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

distance

Find examples in Playground
distance: number

Distance away where the pick collided

faceId

Find examples in Playground
faceId: number

The id of the face on the mesh that was picked

hit

Find examples in Playground
hit: boolean

If the pick collided with an object

originMesh

Find examples in Playground
originMesh: Nullable<AbstractMesh>

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

pickedMesh

Find examples in Playground
pickedMesh: Nullable<AbstractMesh>

The mesh corresponding the the pick collision

pickedPoint

Find examples in Playground
pickedPoint: Nullable<Vector3>

The location of pick collision

pickedSprite

Find examples in Playground
pickedSprite: Nullable<Sprite>

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

ray

Find examples in Playground

The ray that was used to perform the picking.

subMeshId

Find examples in Playground
subMeshId: number

Id of the the submesh that was picked

Methods

getNormal

Find examples in Playground
  • getNormal(useWorldCoordinates?: boolean, useVerticesNormals?: boolean): Nullable<Vector3>
  • Gets the normal correspodning 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 correspodning to the face the pick collided with

getTextureCoordinates

Find examples in Playground
  • Gets the texture coordinates of where the pick occured

    Returns Nullable<Vector2>

    the vector containing the coordnates of the texture

Generated using TypeDoc