Interface PhysicsCollisionInfo
interface PhysicsCollisionInfo {
collidedAgainst: PhysicsBody;
collidedAgainstIndex: number;
collider: PhysicsBody;
colliderIndex: number;
distance: number;
impulse: number;
normal: Vec3;
point: Vec3;
type: "STARTED" | "CONTINUED" | "FINISHED";
}
collidedAgainst: PhysicsBody;
collidedAgainstIndex: number;
collider: PhysicsBody;
colliderIndex: number;
distance: number;
impulse: number;
normal: Vec3;
point: Vec3;
type: "STARTED" | "CONTINUED" | "FINISHED";
}
Index
Properties
collided Against
Second participating body.
collided Against Index
collidedAgainstIndex: number
Thin-instance index of collidedAgainst; 0 for an ordinary body.
collider
First participating body, corresponding to the reported contact point and normal.
collider Index
colliderIndex: number
Thin-instance index of collider; 0 for an ordinary body.
distance
distance: number
Signed separation along the first contact normal; negative values indicate penetration.
impulse
impulse: number
Magnitude of the impulse applied to resolve the contact (0 for FINISHED).
normal
World-space contact normal at the contact point.
point
World-space contact point (closest point on the first body).
type
type: "STARTED" | "CONTINUED" | "FINISHED"
Phase of the contact: a new contact, an ongoing contact, or a contact that just ended.
A single collision event reported by Havok after a physics step.