- Qt 6.8
- Qt Quick 3D
- QML Types
- QtQuick3D.Xr (Technical Preview)
- XrController
- Qt Quick 3D | Commercial or GPLv3

# XrController QML Type

A tracked spatial node that tracks the position and orientation of an input controller. More...

Import Statement: | `import QtQuick3D.Xr`
Since: | Qt 6.8
Inherits: | Node
Status: | Technical Preview

- List of all members, including inherited members

## Properties

- controller : enumeration
- isActive : bool
- jointPositions : list<vector3d>
- jointRotations : list<quaternion>
- pokePosition : vector3d
- poseSpace : enumeration

## Detailed Description

The XrController is a tracked spatial node that tracks the position and orientation of an input controller.

Since this is a tracked node, its spatial properties should be considered read-only.

See also XrInputAction.

## Property Documentation

controller : enumeration

Specifies the controller to track.

It can be one of:

Constant | Value
--- | ---
`XrController.ControllerNone`
`XrController.ControllerLeft`
`XrController.ControllerRight`

isActive : bool `[read-only]`

Indicates whether the controller is providing input.

This property is true if the corresponding physical controller is present and tracking.

jointPositions : list<vector3d> `[read-only]`

When using hand tracking, this property holds the positions of all the bones in the hand.

See also jointRotations and XrHandModel.

jointRotations : list<quaternion> `[read-only]`

When using hand tracking, this property holds the orientation of all the bones in the hand.

See also jointPositions and XrHandModel.

pokePosition : vector3d `[read-only]`

This property holds the position to be used for touch interactions. Typically, it will be the tip of the index finger when tracking a hand.

See also XrView::processTouch and XrView::setTouchpoint.

poseSpace : enumeration `[default: XrController.AimPose]`

Specifies the pose of the controller to track, that is, the orientation and position relative to the physical controller.

It can be one of:

Constant | Description
--- | ---
`XrController.AimPose` | Used when aiming at something, such as with XrVirtualMouse.
`XrController.GripPose` | Used when grabbing something, such as when holding an object in the hand.