Engine API Reference - v2.7.3
    Preparing search index...

    Class ContactResult

    Represents a collection of contact points between two entities in a physics collision. When rigid bodies collide, this object stores the entity involved in the collision and an array of specific contact points where the collision occurred. This information is used by the physics system to resolve collisions and notify components through events.

    Instances of this class are passed to event handlers for the contact and collisionstart events on individual RigidBodyComponent and CollisionComponent instances.

    Unlike SingleContactResult which is used for global contact events, ContactResult objects provide information about collision from the perspective of one entity, with information about which other entity was involved and all points of contact.

    Please refer to the following event documentation for more information:

    Index

    Properties

    Properties

    contacts: ContactPoint[]

    An array of ContactPoints with the other entity.

    other: Entity

    The entity that was involved in the contact with this entity.