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: 41ms

DB GetPage 8
Generate Html 4
SaveChanges (1) 14
Render Body 0
Render Sidebar 6