Garry's Mod Wiki

Garry's Mod Wiki

  DModelPanel:SetAmbientLight( table color )

Description

Sets the ambient lighting used on the rendered entity.

Arguments

1 table color
The color of the ambient lighting.

Example

Displays a model panel with a watermelon that has red ambient lighting.

BGPanel = vgui.Create("DPanel") BGPanel:SetPos(20, 20) BGPanel:SetSize(200, 200) local mdl = vgui.Create("DModelPanel", BGPanel) mdl:SetSize(BGPanel:GetSize()) mdl:SetModel("models/props_junk/watermelon01.mdl") mdl:SetCamPos(Vector(15, 15, 0)) mdl:SetLookAt(Vector(0, 0, 0)) mdl:SetAmbientLight(Color(255, 0, 0, 255))
Output:

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 four times a day. Edits and history are not available.

Last Parsed: Loading...