本页内容

PhysicsBody QML Type

所有具体物理实体的基类。更多...

Import Statement: import QtQuick3D.Physics
Since: Qt 6.4
Inherits:

PhysicsNode

Inherited By:

CharacterController, DynamicRigidBody, and StaticRigidBody

属性

详细说明

PhysicsBody 是所有具有物理存在感的对象的基础类型。这些对象会与其他物体相互作用。某些类型不受模拟影响,例如StaticRigidBody :它们仅对其他物体产生影响。其他物体则完全受模拟控制。

另请参阅《 Qt Quick 3D 》中的“物理形状、物体和关节”。

属性文档

physicsMaterial : PhysicsMaterial

该属性定义了在模拟中,该物体与其他物体发生碰撞或滑动时其行为方式。

注意: 除非另行指定,否则该 属性当前保存的是一个默认值为PhysicsMaterial 的对象,但在未来版本的Qt XML中,其默认值可能会变为null ,因此请勿依赖其值为非空。对于您读取或修改其材质的物体,请显式地为其分配一个PhysicsMaterial 。

另请参阅 PhysicsMaterial 。

simulationEnabled : bool

此属性用于定义物体是否参与物理模拟。

默认值:true

© 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.