ContactHitEvent

constructor(shapeA: Shape, shapeB: Shape, point: Vec2, normal: Vec2, approachSpeed: Float)

Parameters

shapeA

The first shape involved in the collision

shapeB

The second shape involved in the collision

point

The point of impact in world coordinates

normal

Normal vector pointing from shapeA to shapeB

approachSpeed

The speed at which the shapes were approaching (always positive), typically in meters per second