CPhysicsQueryInterface

Usage:

Usage: game.physicsQueryInterface:{method}

This type encapsulates all tracing functionalities.

TraceRay

Function

Performs a regular trace ray call. Skips local player.

Arguments

Name

Type

Description

ray

The ray/shape

from

The starting position

to

The ending position

ignoreWorld

boolean

If true, will ignore the world and only trace against entities.

Returns

Type

Description

The resulting trace object

Example

local ray = Ray_t()
local from = Vector(0, 0, 0)
local to = Vector(100, 100, 100)

local trace = game.physicsQueryInterface:TraceRay(ray, from, to)

TraceMovement

Function

Performs a trace ray call using the player movement mask. Skips local player.

Arguments

Name

Type

Description

ray

The ray/shape

from

The starting position

to

The ending position

Returns

Type

Description

The resulting trace object

Example


TraceGrenade

Function

Performs a trace call using the grenade mask, as a line. Doesn't use a custom ray.

Arguments

Name

Type

Description

from

The starting position

to

The ending position

thrower

The entity throwing the grenade, gets skipped

ignore_breakable

boolean

Ignores any breakable objects if true

Returns

Type

Description

The resulting trace object


TraceGrenadeHull

Function

Performs a trace call using the grenade mask, as a hull. Doesn't use a custom ray.

Arguments

Name

Type

Description

from

The starting position

to

The ending position

thrower

The entity throwing the grenade, gets skipped

Returns

Type

Description

The resulting trace object

Last updated