I have a shop that I made that uses a DModelPanel to draw the weapon models next to the buy button for them. However they are very small and out of place. I’ve been changing values for so long and I can’t get the right values. I’m using world models for weapons if that helps, I don’t know if it’s different for each swep/swep pack, but if anyone knows the right values for it that would be awesome if you could let me know.
Here is my code currently if you need it.
local ModelDisplay = vgui.Create( "DModelPanel", ListItem ) ModelDisplay:SetPos( 64, 0 ) ModelDisplay:SetSize( 100, 100 ) ModelDisplay:SetModel( v.model ) ModelDisplay:SetLookAt( Vector( 0, 20, 40 ) )
This post also might seem stupid but I’ve been trying for about 20 minutes now and I’ve had no luck. Also, I remember seeing a snippet on the forums that centered models in a DModelPanel, but i can’t find it for the life of me.