Garry's Mod Wiki

util.PointContents

number util.PointContents( Vector position )

Description

Returns the contents of the position specified.

Arguments

1 Vector position
Position to get the contents sample from.

Returns

1 number
Contents bitflag, see Enums/CONTENTS

Example

Check if the trace position is underwater.

local tr = Entity( 1 ):GetEyeTrace() print( bit.band( util.PointContents( tr.HitPos ), CONTENTS_WATER ) == CONTENTS_WATER )

Page Links


Special Pages


Wikis

?

Render Time: 35ms

DB GetPage 4
Generate Html 7
SaveChanges 16
Render Body 0
Render Sidebar 5