Guide 1 Docs 2 Reference 3

Function of World

world.raycast

The first block a ray from from along direction meets within max blocks, and the face it came in through; nil for none.

world.raycast(from: Vec3, direction: Vec3, max: number?) → RayHit?

Parameters

fromVec3required
directionVec3required
maxnumberoptional

Returns

RayHit?

Used in