im trying to get a entity to draw a DModelPanel like drawing a SimpleText.
[CODE]
thing = "models/props_c17/chair02a.mdl"
self:DrawModel()
pos = self:GetPos()
ang = self:GetAngles()
cam.Start3D2D( pos, Angle( ang ) , 1 )
draw.SimpleText( "Hej", "MeansFont", 2, 50, Color( 255, 255, 255 ), 1, 0 )
local icon = vgui.Create( "DModelPanel", frame )
icon:SetSize( 512, 512 )
icon:SetPos( Vector(0,0,0) )
icon:Center(frame)
icon:SetModel( thing )
icon:SetCamPos( Vector( 50, 50, 50 ) )
icon:SetLookAt( Vector( 0, 0, 0 ) )
cam.End3D2D()
[/CODE]
The draw.SimpleText works perfect but the DModelPanel follows the player not the entity
Am i way off here or ?
Can't i use a vgui.Create in a Cam 2D3D?
[url]https://github.com/garrynewman/garrysmod/blob/master/garrysmod/lua/vgui/dmodelpanel.lua#L116-L145[/url]
You don't need to draw the panel when you can just do what the panel does to draw the model
[QUOTE=MPan1;51638312][url]https://github.com/garrynewman/garrysmod/blob/master/garrysmod/lua/vgui/dmodelpanel.lua#L116-L145[/url]
You don't need to draw the panel when you can just do what the panel does to draw the model[/QUOTE]
I don't get it.
Have tried a lot of things now but no luck.
Sorry, you need to Log In to post a reply to this thread.