DModelPanel.SetAmbientLight

From GMod Wiki

Jump to: navigation, search
Function
Syntax DModelPanel.SetAmbientLight( Color LightVector )
Description:
Sets the color of the ambient light source, like the sun
Returns: nil
In Object: DModelPanel
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=DModelPanel.SetAmbientLight]DModelPanel.SetAmbientLight [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionDraws Kleiner then makes a red ambient light.
Used onNewerClient.png
Code
//ParentName is the DFrame you want ModelPanel to draw on
local ModelPanel = vgui.Create( "DModelPanel", ParentName )
ModelPanel:SetModel( "models/Kleiner.mdl" )
ModelPanel:SetSize( 100, 100 )
ModelPanel:SetCamPos( Vector( 70, 80, 60 ) )
ModelPanel:SetLookAt( Vector( 0, 0, 0 ) )
ModelPanel:SetAmbientLight( Vector( 255, 0, 0 ) )
OutputKleiner has a red glow around him

Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox