Qt Quick Tech Previewからの3D物理APIの変更点
Qt 6.5.0のリリースをもって、Qt Quick の3D PhysicsモジュールはTech Previewの段階を終了しました。APIに関するフィードバックとレビュープロセスを経て、ソースコードとの互換性を損なう変更がいくつか行われました。
変更の大部分は、他のAPIとの整合性を保ち、名前をより説明的なものにするための型やプロパティの名称変更です。最も顕著な名称変更は、DynamicsWorld からPhysicsWorld への変更であり、これはすべてのアプリケーションに影響を与えます。
最も重要な動作の変更点は、kinematic bodies の処理方法です。キネマティックボディの位置や向きを変更する際、Node のプロパティ(position 、rotation など)を使用するのではなく、新しいプロパティであるkinematicPosition 、kinematicEulerRotation 、kinematicRotation 、およびkinematicPivot を使用するようになりました。 この変更を行った理由は、キネマティックボディの視覚的な動きが、シミュレーションの他の部分と同期するようにし、シミュレーションステップが1つ早まってしまうことを防ぐためです。
DynamicRigidBody.density プロパティは、負の値(およびゼロ)を特別なケースとして扱うことはなくなりました。その代わりに、Density に代わる2つの新しいmassMode 列挙値が追加されました:
DefaultDensity | 物体の密度はPhysicsWorld.defaultDensity によって定義されます。これがデフォルトです。 |
CustomDensity | 物体の密度は、density プロパティによって定義されます。 |
enableTriggerReports プロパティは、sendTriggerReports に名称が変更されました。さらに、receiveTriggerReports を設定することで、フィジックスオブジェクトがトリガーボディに入った際に通知を受けられるようになりました。
APIの変更点の完全な一覧は以下の通りです:
- CollisionShape:
- enableDebugView の名称がenableDebugDraw
- 抽象基底型 `
CollisionNode` の名称をPhysicsNode- `enableTriggerReports`を`sendTriggerReports `に変更し、receiveTriggerReports
- CharacterController
speedの名称をmovement
- ConvexMeshShape
meshSourceの名前をsource
- HeightFieldShape
heightMapの名前を次のように変更しましたsource
- TriangleMeshShape
meshSourceの名前を変更してsource
- PhysicsWorld (
DynamicsWorldから名称変更)forceDebugViewの名称をforceDebugDrawminTimestep/maxTimestepをminimumTimestep/ に変更maximumTimestep- sceneNode を削除しました
- 追加scene
- 追加viewport
- DynamicRigidBody
axisLockLinearX/Y/Zのプロパティを、ビットフィールドを受け取る単一のプロパティlinearAxisLock に変更しましたaxisLockAngularX/Y/Zのプロパティを、ビットフィールドを受け取る単一のプロパティangularAxisLock に変更しました- 新しいプロパティ `kinematicPosition`、`kinematicEulerRotation`、`kinematicRotation` を追加し、kinematicPivot
Densityの列挙型値をDefaultDensity/CustomDensity に変更し、負の値に対する特別な処理を削除しました。linearVelocityプロパティをsetLinearVelocity メソッドに置き換えました。angularVelocityプロパティをsetAngularVelocity メソッドに置き換えました。
© 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.