@emile/engine / physics/raycast / RayCol
Class: RayCol
Defined in: src/physics/raycast.ts:49
Data type that contains information about an intersection between a ray and a body.
Constructors
new RayCol()
new RayCol(
body,point,normal,verts):RayCol
Defined in: src/physics/raycast.ts:63
Initializes a raycol object with the given data.
Parameters
body
The body that the ray has collided with.
point
The collision point.
x
number
y
number
normal
The normal of the edge that the ray collides with.
x
number
y
number
verts
The vertices of the edge that the ray collides with.
Vec2[] | vec2[]
Returns
RayCol
Properties
body
body:
TypedBody
Defined in: src/physics/raycast.ts:50
entity
entity:
string
Defined in: src/physics/raycast.ts:54
normal
normal:
Vec2
Defined in: src/physics/raycast.ts:52
point
point:
Vec2
Defined in: src/physics/raycast.ts:51
verts
verts:
Vec2[]
Defined in: src/physics/raycast.ts:53