API

Function CreatePickingRay

  • Creates a ray that can be used to pick in the scene

    Parameters

    • scene: Scene

      defines the scene to use for the picking

    • x: number

      defines the x coordinate of the origin (on-screen)

    • y: number

      defines the y coordinate of the origin (on-screen)

    • world: Nullable<Matrix>

      defines the world matrix to use if you want to pick in object space (instead of world space)

    • camera: Nullable<Camera>

      defines the camera to use for the picking

    • cameraViewSpace: boolean = false

      defines if picking will be done in view space (false by default)

    Returns Ray

    a Ray