Revision Difference
util.PointContents#512283
<function name="PointContents" parent="util" type="libraryfunc">⤶
<description>Returns the contents of the position specified.</description>⤶
<realm>Shared</realm>⤶
<args>⤶
<arg name="position" type="Vector">Position to get the contents sample from.</arg>⤶
</args>⤶
<rets>⤶
<ret name="" type="number">Contents bitflag, see <page>CONTENTS</page></ret>⤶
</rets>⤶
</function>⤶
⤶
<example>⤶
<description>Check if the trace position is underwater.</description>⤶
<code>⤶
local tr = Entity( 1 ):GetEyeTrace()⤶
print( bit.band( util.PointContents( tr.HitPos ), CONTENTS_WATER ) == CONTENTS_WATER )⤶
</code>⤶
⤶
</example>