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

Session 0
DB GetPage 4
Generate Html 1
SaveChanges 10
Render Body 0
Render Sidebar 12