I’ve created a derma panel, and parented a DModelPanel to it, but the thing is, the model panel is invisible / does not show.
Here is the code:
[lua]CharacterCreation = vgui.Create( “DFrame” )
CharacterCreation:SetSize( 600, 600 )
CharacterCreation:Center()
CharacterCreation:SetTitle( “Garry Company Character Creation” )
CharacterCreation:SetVisible( true )
CharacterCreation:SetDraggable( false )
CharacterCreation:ShowCloseButton( true )
CharacterCreation:MakePopup()
ModelPreview = vgui.Create( “DModelPanel”, CharacterCreation )
ModelPreview:SetModel( LocalPlayer():GetModel() )
ModelPreview:SetSize( 200, 400 )
ModelPreview:SetPos( 300, 50 )
ModelPreview:SetCamPos( Vector( 70, 80, 60) )
ModelPreview:SetLookAt( Vector( 0, 0, 0 ) )
ModelPreview:SetAmbientLight( Vector( 255, 0, 0 ) )[/lua]
These are both part of a function, so don’t moan at me about it not being local, I just have not included the whole of the function, and I won’t, because you don’t need the rest of the function.