AddOriginToPVS

From Garry's Mod
Jump to: navigation, search
 AddOriginToPVS( )

Contents

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

Vector position

The origin to add.

Examples

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(pPlayer, pViewEntity)
	-- Adds any view entity
	if (pViewEntity:IsValid()) then
		AddOriginToPVS(pViewEntity:GetPos())
	end
end)


Personal tools
Navigation