Garry's Mod Wiki

Revision Difference

DAdjustableModelPanel#552320

<panel> <name>DAdjustableModelPanel</name> <parent>DModelPanel</parent> <realm>Client</realm>⤶ <preview>DAdjustablePanel.jpg</preview> <description> 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 <key>W</key> <key>S</key> <key>A</key> <key>D</key> <key>Up</key> <key>Down</key> <key>Left</key> <key>Right</key> <key>Space</key> and <key>Ctrl</key> can be used when the right mouse is held down, with <key>Shift</key> acting as a speed multiplier. When the left mouse is used, the Shift key holds the current `y` angle steady. This is used by <page>IconEditor</page> for modifying spawn icons. </description> ⤶ </panel>⤶ </panel>⤶ <example> <description>Creates an Adjustable Model Panel</description> <code> 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" ) </code> </example>