bodyShapeEntered

    Emitted when one of this RigidBody3D’s Shape3Ds collides with another PhysicsBody3D or GridMap’s Shape3Ds. Requires contactMonitor to be set to true and maxContactsReported to be set high enough to detect all the collisions. GridMaps are detected if the MeshLibrary has Collision Shape3Ds.

    RigidBody3D.swift:2083
    var bodyShapeEntered: Signal1 { get }

    bodyRid the RID of the other PhysicsBody3D or MeshLibrary’s CollisionObject3D used by the PhysicsServer3D.

    body the Node, if it exists in the tree, of the other PhysicsBody3D or GridMap.

    bodyShapeIndex the index of the Shape3D of the other PhysicsBody3D or GridMap used by the PhysicsServer3D. Get the CollisionShape3D node with body.shape_owner_get_owner(body.shape_find_owner(body_shape_index)).

    localShapeIndex the index of the Shape3D of this RigidBody3D used by the PhysicsServer3D. Get the CollisionShape3D node with self.shape_owner_get_owner(self.shape_find_owner(local_shape_index)).

    To connect to this signal, reference this property and call the

    connect method with the method you want to invoke

    Example:

    obj.bodyShapeEntered.connect { bodyRid, body, bodyShapeIndex, localShapeIndex in
       print ("caught signal")
    }

    Other members in extension

    Types

    Type members

    Instance members

    Show implementation details (1)

    Hide implementation details

    • func _integrateForces(state: PhysicsDirectBodyState3D?)

      Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it works in addition to the usual physics behavior, but the customIntegrator property allows you to disable the default behavior and do fully custom force integration for a body.