Contact Hit Event
data class ContactHitEvent(val shapeA: Shape, val shapeB: Shape, val point: Vec2, val normal: Vec2, val approachSpeed: Float)
Event generated when two shapes collide with significant impact.
Hit events are only generated when the approach speed exceeds the world's hit event threshold (configurable in WorldDef).
Parameters
shape A
The first shape involved in the collision
shape B
The second shape involved in the collision
point
The point of impact in world coordinates
normal
Normal vector pointing from shapeA to shapeB
approach Speed
The speed at which the shapes were approaching (always positive), typically in meters per second