API

Function CreatePickingRayToRef

  • 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)

    • result: Ray

      defines the ray where to store the picking ray

    • 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)

    • enableDistantPicking: boolean = false

      defines if picking should handle large values for mesh position/scaling (false by default)

    Returns Scene

    the current scene