- Qt 6.7
- Qt Quick 3D
- QML Types
- PickResult
- Qt Quick 3D | Commercial or GPLv3

# PickResult QML Type

Contains the results of a pick. More...

Import Statement: | import QtQuick3D

- List of all members, including inherited members

## Properties

- distance : float
- instanceIndex : int `(since 6.5)`
- normal : vector3d
- objectHit : Model
- position : vector3d
- sceneNormal : vector3d
- scenePosition : vector3d
- uvPosition : vector2d

## Detailed Description

Created as a return object to View3D::pick.

## Property Documentation

distance : float `[read-only]`

This property holds the distance between the pick origin and the hit position i.e. the length of the ray. In the case of using viewport coordinates for picking the pick origin will be the active camera's position.

instanceIndex : int `[read-only, since 6.5]`

This property holds the index in the instance table for the case where the pick hit an instance of an instanced model.

This property was introduced in Qt 6.5.

normal : vector3d `[read-only]`

This property holds the normal of the face that was hit in local coordinate space.

objectHit : Model `[read-only]`

This property holds the model object hit by the pick.

position : vector3d `[read-only]`

This property holds the scene position of the hit in local coordinate space.

sceneNormal : vector3d `[read-only]`

This property holds the normal of the face that was hit in scene coordinate space.

scenePosition : vector3d `[read-only]`

This property holds the scene position of the hit.

uvPosition : vector2d `[read-only]`

This property holds the UV position of the hit. The UV position is calculated as the normalized local x and y coordinates of the hit point relative to the bounding volume. Useful for further picking against an offscreen-rendered object.