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 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" )

Page Links

Special Pages



Render Time: 37ms

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