PhysicsNode QML Type

Base type for all objects in the physics scene. 更多...

import 語句: import QtQuick3D.Physics
Since: Qt 6.4
繼承: Node
繼承者: PhysicsBody and TriggerBody

特性

信號

詳細描述

PhysicsNode is the base type for all the objects that take part in the physics simulation. These objects have a position in three-dimensional space and a geometrical shape.

特性文檔編製

collisionShapes : list < CollisionShape >

This property contains the list of collision shapes. These shapes will be combined and act as a single rigid body when interacting with other bodies.

另請參閱 Shapes and Bodies overview documentation .

receiveContactReports : bool

This property determines whether this body will receive contact reports when colliding with other bodies. If activated, this means that the bodyContact signal will be emitted on a collision with a body that has sendContactReports set to true.

receiveTriggerReports : bool

This property determines whether this body will receive reports when entering or leaving a trigger body.

sendContactReports : bool

This property determines whether this body will send contact reports when colliding with other bodies.

sendTriggerReports : bool

This property determines whether this body will send reports when entering or leaving a trigger body.


信號文檔編製

bodyContact ( PhysicsNode * body , list < vector3D > positions , list < vector3D > impulses , list < vector3D > normals )

This signal is emitted when there is a collision and receiveContactReports 被設為 true in this body and sendContactReports 被設為 true in the colliding body 。參數 positions , impulses and normals contain the position, impulse force and normal for each contact point at the same index.

注意: 相應處理程序是 onBodyContact .

enteredTriggerBody ( TriggerBody * body )

This signal is emitted when this body enters the specified trigger body .

注意: Only emitted when receiveTriggerReports is true

注意: 相應處理程序是 onEnteredTriggerBody .

另請參閱 receiveTriggerReports and exitedTriggerBody .

exitedTriggerBody ( TriggerBody * body )

This signal is emitted when this body exits the specified trigger body .

注意: Only emitted when receiveTriggerReports is true

注意: 相應處理程序是 onExitedTriggerBody .

另請參閱 receiveTriggerReports and enteredTriggerBody .