Garry's Mod Wiki

Garry's Mod Wiki

  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, output = {} } function util.IsInWorld( pos ) tr.start = pos tr.endpos = pos return not util.TraceLine( tr ).HitWorld end

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...