本页内容

TriggerBody QML Type

当对象进入指定体积时触发报告。更多...

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

PhysicsNode

属性

信号

详细说明

此类型定义了一个触发体。触发体是一种不进行物理交互,但用于检测物体何时与其体积发生相交的实体。

属性文档

collisionCount : int

该属性返回当前与触发体发生碰撞的物体数量。

信号文档

bodyEntered(PhysicsNode *body)

当触发器主体被指定的body 穿透时,会发出此信号。

注意: 对应的处理程序 为onBodyEntered 。

bodyExited(PhysicsNode *body)

当触发体不再被指定的body 穿透时,会发出此信号。

注意: 相应的处理程序 为onBodyExited 。

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