• IgnoreZ on Clientsidemodel
    2 replies, posted
I'm trying to draw a model which ignores the depth buffer (ignorez) but I can't figure out how to do it and I can't get cam.Start3D to work right for me [lua] //self.model = clientsidemodel, all I do is create it and set its position //self is a panel //I tried putting cam.Start3D(EyePos(),EyeAngles()) in the panel paint but it doesn't show up at all //ofcourse I did the below in the start3d but it doesn't show up self.model:SetNoDraw() --with and without - doesn't work self.model.Draw = function(self) cam.IgnoreZ(true) self:DrawModel() cam.IgnoreZ(false) end [/lua] Also, the players view angles are not the same as the real(?) angles if it matters
[url]https://github.com/garrynewman/garrysmod/blob/master/garrysmod/lua/vgui/dmodelpanel.lua[/url] Study.
Alright fixed, I had to use LocalPlayer():GetPos() instead of EyePos().
Sorry, you need to Log In to post a reply to this thread.