• drawing through wall? (mat)
    2 replies, posted
I'm writing a script similar to the one in TF2 that draws the cart through the wall from afar, (for my gamemode) except for props in my case and I'm having some difficulty in getting them to draw through the wall [PHP] for _, v in pairs( getAllEnt() ) do if v:IsValid() and v:GetClass() != "viewmodel" and !v:IsWeapon() and !v:IsPlayer() then cam.IgnoreZ(true); v:SetMaterial("models/wireframe") v:SetColor( 255, 255, 255, 255) cam.IgnoreZ(false); end end [/PHP] is a snippet of what i'm using, the wireframe doesn't draw from the wall and I have a feeling it has something to do with Ignorez being 0 - I tried cam.Ignorez but I believe you need to use the cam.() operators which I've no clue how to use (yes, I read the wiki!) at any rate I'm faced with the problem of drawing a material through a wall and I'd appreciate some help - thanks! also, it should work with [PHP] for _, v in pairs( getAllEnt() ) do if v:IsValid() and v:GetClass() != "viewmodel" and !v:IsWeapon() and !v:IsPlayer() then cam.IgnoreZ(true); local getMaterial = v:GetMaterial() v:SetMaterial(getMaterial) v:SetColor( 255, 255, 255, 255) cam.IgnoreZ(false); end end [/PHP] (as in setting the original mat to draw through walls)
call DrawModel too.
I'm trying to draw random entities with their own models? [url]http://wiki.garrysmod.com/?title=Entity.DrawModel[/url]
Sorry, you need to Log In to post a reply to this thread.