Aego Русский

Contact

struct Contact

Contact describes a touch between two colliders from the receiver's side. Normal points from the other body into this one, RelativeVelocity is this body's velocity relative to the other at Point.

On this page

Normal field

field Normal Vec2

Points from the other body into the body receiving the collision callback; the opposite receiver gets the negated direction.

NormalImpulse field

field NormalImpulse float

Stores the summed normal impulse at the contact, in mass×world-units/second. An exit event reports zero.

OtherCollider field

field OtherCollider NodeRef

References the other side's collider node, not necessarily its rigid-body node. Check validity if that node may have been destroyed.

Point field

field Point Vec2

Stores the world-space contact point in world units, averaged when the manifold has several points. Exit events retain the last known point.

RelativeVelocity field

field RelativeVelocity Vec2

Stores this body's velocity relative to the other at Point, in world units per second, including angular motion at that point.

SelfCollider field

field SelfCollider NodeRef

References the receiving side's collider node; it can differ from the rigid-body node when the collider is a child.