On this page

queryHit QML Value Type

Represents the result of a spatial physics query hit (raycast, sweep, or overlap). More...

Import Statement: import QtQuick3D.Physics
Since: Qt 6.13
Inherited By:

locationHit

Properties

  • body : PhysicsNode (since 6.13)
  • shape : CollisionShape (since 6.13)

Detailed Description

The queryHit struct provides hit information returned by spatial queries in the physics world.

See also PhysicsNode and CollisionShape.

Property Documentation

body : PhysicsNode [read-only, since 6.13]

Holds the physical body (PhysicsNode) intersected by the spatial query.

This property was introduced in Qt 6.13.

shape : CollisionShape [read-only, since 6.13]

Holds the specific collision shape (CollisionShape) intersected by the spatial query. Returns null if the underlying PhysX shape has no associated Qt collision shape.

Note: When a query intersects a CharacterController, the body property is populated, but the shape property will be null because character controllers do not assign individual shape metadata.

This property was introduced in Qt 6.13.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.