garrysmod-issues
garrysmod-issues copied to clipboard
DModelPanel doesnt render if it's x or y coordinate is negative
If you create a DModelPanel that has negative coordinates, but is wide enough to be seen on the screen, then it wont be rendered. Here's an altered example from gmod wiki to reproduce this problem:
local Panel = vgui.Create( "DPanel" ) Panel:SetPos( -1, -1 ) Panel:SetSize( 200, 200 )
local icon = vgui.Create( "DModelPanel", Panel ) icon:SetSize(200,200) icon:SetModel( "models/player/alyx.mdl" ) function icon:LayoutEntity( Entity ) return end
This is an issue inherited from https://wiki.facepunch.com/gmod/cam.Start3D
There was a issue for this at #1995 but it's a 404 for some reason now.
It maybe could be worked around with a render target. https://github.com/Facepunch/garrysmod-issues/issues/4958 I think might also be solved by that