Currently I am trying to prevent my cam.Start3D from seeing through walls but cam.IgnoreZ appears to not be working? Here's my code
cam.Start3D(EyePos(), EyeAngles())
local succ, err = pcall(function()
local mat = Material("models/debug/debugwhite")
render.MaterialOverride(mat)
for k, v in pairs(player.GetAll()) do
if (IsValid(v)) then
if (v:Alive()) then
render.SetColorModulation(heatcolor.r / 255, heatcolor.g / 255, heatcolor.b / 255)
render.SetBlend(heatcolor.a / 255)
render.SuppressEngineLighting( true )
v:SetModelScale(1.25, 0)
v:DrawModel()
v:SetModelScale(1, 0)
end
end
end
for _, ent in pairs(ents.GetAll()) do
if (IsValid(ent)) then
if (ent:IsNPC()) then
render.SetColorModulation(heatcolor.r / 255, heatcolor.g / 255, heatcolor.b / 255)
render.SetBlend(heatcolor.a / 255)
render.SuppressEngineLighting( true )
ent:SetModelScale(1.25, 0)
ent:DrawModel()
ent:SetModelScale(1, 0)
end
end
end
render.MaterialOverride(nil)
render.SuppressEngineLighting(false)
end)
print(succ, err)
cam.End3D()
What hook are you putting this code in?
Sorry, you need to Log In to post a reply to this thread.