Garry's Mod Wiki

util.IsInWorld

boolean util.IsInWorld( Vector position )

Description

Checks if a certain position is within the world bounds.

Arguments

1 Vector position
Position to check.

Returns

1 boolean
Whether the vector is in world.

Example

Here's a trick you can do to achieve the behavior of this function on the client.

(This may be less efficient than the serverside function itself)

local tr = { collisiongroup = COLLISION_GROUP_WORLD } function util.IsInWorld( pos ) tr.start = pos tr.endpos = pos return util.TraceLine( tr ).HitWorld end

Page Links


Special Pages


Wikis

?

Render Time: 73ms

DB GetPage 40
Generate Html 9
SaveChanges (1) 15
Render Body 0
Render Sidebar 6