Skip to content

RaycastHit

Defined in: physics/src/types.ts:453

Result of a raycast query.

distance: number

Defined in: physics/src/types.ts:461

Distance from ray origin in pixels.


entity: Entity

Defined in: physics/src/types.ts:455

The entity that was hit.


normal: Vec2

Defined in: physics/src/types.ts:459

Surface normal at the hit point.


point: Vec2

Defined in: physics/src/types.ts:457

Hit point in world pixels.

Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/physics.md.