ray

Describes the ray type used by the tracing methods.

set_hull

Method

Changes the shape of the ray to a box/hull, using the specified mins and maxs.

Arguments

Name

Type

Description

mins

vector

The minimum bounding of the box

maxs

vector

The maximum bounding of the box

Returns

Nothing.

Example

local ray = ray_t()
ray:set_hull(vector(-4, -4, -4), vector(4, 4, 4)) -- Traces a cube (8x8x8).

set_sphere

Method

Changes the shape of the ray to a sphere, using the specified center position and radius.

Arguments

Name

Type

Description

center

vector

The center of the sphere

radius

number

The radius of the sphere

Returns

Nothing.

Example

Last updated