Allow configuring CCD type selectively per object


In large scenes, enabling CCD globally for all scene objects is usually
counterproductive due to performance overhead, especially given that
physics computation runs on the CPU. Typically, CCD is only needed for
specific fast-moving objects, such as bullets or projectiles, as is
standard practice in other engines.

Add DynamicRigidBody::ccd property (supporting None, SweepBasedCCD, and
SpeculativeCCD) so CCD can be configured per object. Sweep-based CCD is
applied for non-kinematic bodies, while kinematic bodies automatically
fall back to Speculative CCD as PhysX does not support sweep-based CCD
for them.

PhysicsWorld::enableCCD is deprecated in favor of DynamicRigidBody::ccd.
CCD is now always available at the scene level (setting
PxSceneFlag::eENABLE_CCD has negligible cost when no body opts in, since
PhysX's CCD pass bails out immediately when no objects have CCD flags).

For compatibility with existing content, setting PhysicsWorld::enableCCD
to true still enables CCD for all bodies that do not explicitly override
their ccd property (using SweepBasedCCD for dynamic bodies and
SpeculativeCCD for kinematic ones).

[ChangeLog][QtQuick3D][DynamicRigidBody] Added ccd property to allow
configuring continuous collision detection type (None, SweepBasedCCD,
SpeculativeCCD) per object. [ChangeLog][QtQuick3D][PhysicsWorld]
Deprecated enableCCD in favor of DynamicRigidBody::ccd. Setting
PhysicsWorld::enableCCD to true serves as a global fallback for bodies
with ccd set to None.

Change-Id: I4132f17f9ab7b995b852b1d519c9ae90a906d3f4
Reviewed-by: Andrei Yankovich <EndrIIMail@gmail.com>
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
commit07dd4881d9a272b891e446c2588a9f3819cccd0f
parent4d2ecc717c30eaa600b1adc9d60c8b1df4e48039
authorAndrei Yankovich <EndrIIMail@gmail.com>
committerJonas Karlsson <jonas.karlsson@qt.io>
commit timeFri, 7 Aug 2026 09:47:32 +0000