Ray_t

Describes the ray type used by the tracing methods.

SetHull

Method

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

Arguments

Name

Type

Description

mins

The minimum bounding of the box

maxs

The maximum bounding of the box

Returns

Nothing.

Example

local ray = Ray_t()
ray:SetHull(Vector(-4, -4, -4), Vector(4, 4, 4)) -- Traces a cube (8x8x8).

SetSphere

Method

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

Arguments

Name

Type

Description

center

The center of the sphere

radius

number

The radius of the sphere

Returns

Nothing.

Example

Last updated