Problem with DModelPanel

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.

DModelPanels are funny things. I’ve often found that they only work when perfectly square - otherwise they do exactly what you’re talking about. Just change it to 200 x 200 and mess with the camera angles.

Ah ok, thank you will test to see if it works

[editline]11:37AM[/editline]

Tested it, it worked, but all it did was fuck up whenever you select a different class ( Models change when you select the class ) so whenever I chose a different class, it would turn into an error model.