render.DrawBeam

From GMod Wiki

Jump to: navigation, search
Function
Syntax render.DrawBeam( Vector StartPos, Vector EndPos, Number Width, Number TextureStart, Number TextureEnd, Color Colour )
Where is this used?
Description:
Draws a beam from StartPos to EndPos.
Returns: nil
Part of Library: render
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Render.DrawBeam]Render.DrawBeam [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionThis will draw a red beam through the entity.
Used onNewerClient.png
Code
local Laser = Material( "cable/redlaser" )
 
function ENT:Draw()
 
	self:DrawModel() 
 
	local Vector1 = self:LocalToWorld( Vector( 0, 0, -200 ) )
	local Vector2 = self:LocalToWorld( Vector( 0, 0, 200 ) )
 
	render.SetMaterial( Laser )
	render.DrawBeam( Vector1, Vector2, 5, 1, 1, Color( 255, 255, 255, 255 ) ) 
 
end 
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox