Skip to main content

Interface: RaycastCollision

Defined in: physics/raycast.ts:46

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

Properties

body

body: RigidBody

Defined in: physics/raycast.ts:50

The body that was hit by the ray.


normal

normal: Vector2

Defined in: physics/raycast.ts:58

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


point

point: Vector2

Defined in: physics/raycast.ts:54

The point of intersection between the ray and the body.


vertices

vertices: Vector2[]

Defined in: physics/raycast.ts:62

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