Skip to main content

Interface: RaycastCollision

Defined in: physics/raycast.ts:60

RaycastCollision interface that represents a collision between a ray and a body.

Properties

body

body: Body

Defined in: physics/raycast.ts:64

The body that was hit by the ray.


normal

normal: Vector2

Defined in: physics/raycast.ts:72

The normal vector of the edge at the point of intersection.


point

point: Vector2

Defined in: physics/raycast.ts:68

The point of intersection between the ray and the body.


vertices

vertices: Vector2[]

Defined in: physics/raycast.ts:76

The vertices of the body that were hit by the ray.