Add Raycaster scene query type


PhysicsWorld can cast a ray on request, but a ray that must be checked
on every frame, such as a ground probe, a suspension ray or a line of
sight, needs the same code each time: a frameDone handler that maps the
ray into the scene, runs the query, keeps the result and notices when
the hit body changes. Raycaster is that code as a node. It follows its
own transform, is updated once per physics frame before frameDone, and
holds the closest hit as the locationHit the queries return, so
bindings can use it directly.

This complements TriggerBody rather than duplicating it: a trigger
reports the bodies inside a volume, while the ray reports the nearest
surface along a direction, with its position, normal and distance.

A ray mounted on a body skips that body and every body above it, and
excludedBodies names other bodies to skip. Both are filtered out inside
the query, so each ray costs a single blocking raycast per frame.
Static or dynamic bodies can be left out as a whole. Since a hit is now
kept across frames, the query hit stores its body and shape with
QPointer.

Add an example that shows a ray and its hit, and Design Studio support
for placing one. Rays are not cast in the Design Studio preview, which
has no bodies in its PhysX scene.

[ChangeLog][Raycaster] New type for continuous ray intersection
queries against physics bodies.

Change-Id: I1f4bcdcfd44403d102e06e048b49505729d830e1
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
commit778cba6e95c619f4925b33a63677b86a62239a7f
parentbeb9953e8b681bb16923fc14157c62c6b11b688e
authorPrzemyslaw Nogaj <pno@spyro-soft.com>
committerPrzemyslaw Nogaj <pno@spyro-soft.com>
commit timeFri, 2 Oct 2026 05:05:53 +0000