I am trying to create a simple HUD that shows the player's model. My question is how would I draw the players model into a 2D image on the HUD?
Use: [URL="http://wiki.garrysmod.com/page/VGUI/Elements/SpawnIcon"]Spawn Icon[/URL], however only drawn the actualy element ONCE, but you can SET it's model as many times as you want. Use icon:SetModel(LocalPlayer():GetModel()) to set the model.
[editline]9th January 2014[/editline]
Also, you may want to look at:
[code]
icon.OnMousePressed = function() return false end
icon.OnCursorEntered = function() return false end
[/code]
Both of which prevent outlines from appearing on the model, IIRC.
Use DModelPanel instead of SpawnIcon.
[QUOTE=Chessnut;43479532]Use DModelPanel instead of SpawnIcon.[/QUOTE]
Well it depends.
Use SpawnIcon if you want a custom image of the model.
Use DModelPanel if you want to display a model that isn't static. (rotating, animations, etc)
Sorry, you need to Log In to post a reply to this thread.