The total accumulated impulse applied by the constraint solver during the last sub-step. This value represents how hard two objects collided. Higher values indicate stronger impacts.
The point on the entity where the contact occurred, in the local space of its rigid body. That space has the entity's world position and rotation, with any CollisionComponent#linearOffset and CollisionComponent#angularOffset applied, and ignores the entity's scale.
The point on the other entity where the contact occurred, in the local space of the other entity's rigid body (see ContactPoint#localPoint).
The normal vector of the contact on the other entity, in world space. This vector points away from the surface of the other entity at the point of contact.
The point on the entity where the contact occurred, in world space.
The point on the other entity where the contact occurred, in world space.
Represents a single point of contact between two colliding rigid bodies in the physics simulation. Each contact point stores detailed spatial information about the collision, including both local and world space coordinates of the exact contact points on both entities, the contact normal direction, and the collision impulse force.
Contact points are generated by the physics engine during collision detection and are typically accessed through a ContactResult object, which can contain multiple contact points for a single collision between two entities. Multiple contact points commonly occur when objects collide along edges or faces rather than at a single point.
The impulse property can be particularly useful for gameplay mechanics that need to respond differently based on the force of impact, such as damage calculations or sound effect volume.
Contact points are pooled and reused by the physics system, so a contact point and its vectors are only valid inside the event handler that receives them. Copy any values that are needed later, for example with Vec3#clone.
Example