• Something like SetViewEntity in Derma?
    1 replies, posted
Hello, I've been wondering for a while how to create something like how SetViewEntity ([url]https://wiki.garrysmod.com/page/Player/SetViewEntity[/url]) but in a smaller/scaled form inside a derma panel. I've messed around with some render target stuff, but wasn't able to create any result without outputting errors. (I'm also trying to keep the players view the same, but the panel's "image" would keep the entities view) Any help/insight would be great.
Try this: [CODE] local f = vgui.Create( 'DFrame' ) f:SetSize( 500, 500 ) f:Center() f:MakePopup() f.Paint = function( self, w, h ) local x, y = self:GetPos() render.RenderView( { origin = Vector( 0, 0, 0 ), -- change to your liking angles = Angle( 0, 0, 0 ), -- change to your liking x = x, y = y, w = w, h = h, } ) end [/CODE] Seems to work for me (I feel actually smart for working that out for some reason) [URL="http://wiki.garrysmod.com/page/Structures/ViewData"]More RenderView stuff you can set[/URL] I added this as an example for the ViewData wiki page :P
Sorry, you need to Log In to post a reply to this thread.