Garry's Mod Wiki

Garry's Mod Wiki

  AddOriginToPVS( Vector position )

Description

Adds the specified vector to the PVS which is currently building. This allows all objects in visleafs visible from that vector to be drawn.

Arguments

1 Vector position
The origin to add.

Example

Adds an RTCamera's current position to all player's PVS, causing props near it to always render on an rtscreen.

hook.Add( "SetupPlayerVisibility", "AddRTCamera", function( ply, viewEntity ) -- Adds any view entity if viewEntity:IsValid() and !viewEntity:TestPVS( ply ) then -- If we don't test if the PVS is already loaded, it could crash the server. AddOriginToPVS( viewEntity:GetPos() ) end 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 twice a day. Edits and history are not available.

Last Parsed: Loading...