Garry's Mod Wiki




A derivative of the DModelPanel in which the user may modify the perspective of the model with their mouse and keyboard by clicking and dragging.

The keyboard keys w s a d up down left right space and ctrl can be used when the right mouse is held down, with ⇧ shift acting as a speed multiplier. When the left mouse is used, the Shift key holds the current y angle steady.

This is used by IconEditor for modifying spawn icons.


Derives methods, etc not listed on this page from DModelPanel.


This is used internally - although you're able to use it you probably shouldn't. Used by the panel to perform mouse capture operations when adjusting the model.
This is used internally - although you're able to use it you probably shouldn't. Used to adjust the perspective in the model panel via the keyboard, when the right mouse button is used.
boolean DAdjustableModelPanel:GetFirstPerson()
Gets whether mouse and keyboard-based adjustment of the perspective has been enabled. See DAdjustableModelPanel:SetFirstPerson for more information.
DAdjustableModelPanel:SetFirstPerson( boolean enable )
Enables mouse and keyboard-based adjustment of the perspective. This is set to true automatically each time mouse capture is enabled, and hence doesn't serve as a usable setting, other than to disable this functionality after the PANEL:OnMousePressed event.


Creates an Adjustable Model Panel

local AdjustableModelPanel = vgui.Create( "DAdjustableModelPanel" ) AdjustableModelPanel:SetPos( 10, 10 ) AdjustableModelPanel:SetSize( 280, 280 ) AdjustableModelPanel:SetLookAt( Vector( 0, 0, 0 ) ) AdjustableModelPanel:SetModel( "models/props_borealis/bluebarrel001.mdl" )

Special Pages



Render Time: 31ms

DB GetPage 3
Generate Html 5
SaveChanges (1) 9
Render Body 0
Render Sidebar 11