Entity.SetRenderBoundsWS

From GMod Wiki

Jump to: navigation, search
Function
Syntax Entity:SetRenderBoundsWS( Vector min, Vector max )
Description:
Updates the visual bounds for this entity to be draw on the screen, with the specified world vectors
Returns: nil
In Object: Entity
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.SetRenderBoundsWS]Entity.SetRenderBoundsWS [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionTaken from sandbox/entities/effects/LaserTracer/init.lua
Used onNewerClient.png
Code
 
 function EFFECT:Init( data ) 
 
 	self.StartPos 	= data:GetStart()	 
 	self.EndPos 	= data:GetOrigin() 
 	self.Dir 		= self.EndPos - self.StartPos 
 
 
 	self:SetRenderBoundsWS( self.StartPos, self.EndPos ) 
 
 	self.TracerTime = math.Rand( 0.2, 0.3 ) 
 	self.Length = math.Rand( 0.1, 0.15 ) 
 
 	// Die when it reaches its target 
 	self.DieTime = CurTime() + self.TracerTime 
 
 end 
OutputN/A


See Also

Entity.GetRenderBoundsWS

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox