Garry's Mod Wiki

PhysCollide:TraceBox

Vector, Vector, number PhysCollide:TraceBox( Vector origin, Angle angles, Vector rayStart, Vector rayEnd, Vector rayMins, Vector rayMaxs )

Description

Performs a trace against this PhysCollide with the given parameters. This can be used for both line traces and box traces.

Arguments

1 Vector origin
The origin for the PhysCollide during the trace
2 Angle angles
The angles for the PhysCollide during the trace
3 Vector rayStart
The start position of the trace
4 Vector rayEnd
The end position of the trace
5 Vector rayMins
The mins of the trace's bounds
6 Vector rayMaxs
The maxs of the trace's bounds

Returns

1 Vector
Hit position of the trace. This is false if the trace did not hit.
2 Vector
Hit normal of the trace
3 number
Fraction of the trace. This is calculated from the distance between startPos, hitPos, and endPos.

Page Links


Special Pages


Wikis

?

Render Time: 62ms

DB GetPage 4
Generate Html 31
SaveChanges (1) 12
Render Body 0
Render Sidebar 13