I'm trying to draw a halo around the viewmodel of the player, but its turning out like this:
[img]http://i.imgur.com/G1ja4jW.jpg[/img]
[code]
for k,v in pairs( playerGet() ) do
if v:HasEnergyShield() and v:Alive() then
local dist = LocalPlayer():GetPos():Distance( v:GetPos() )
local scale = 1 - ( dist / 800 )
p = v:GetShieldCharge()/v:GetShieldMax()
local tbl = { v }
local wep = v:GetActiveWeapon()
local vm = v:GetViewModel()
if IsValid( vm ) and not table.HasValue( blackList, wep:GetClass() ) then
tbl[ #tbl+1 ] = vm
end
halo.Add( tbl, Color( 255*(1-p), 70*p, 200*p, 255 - 150*(p) ), 2*scale, 2*scale, 5, true, false )
end
end
[/code]
No idea what's up with this, any help is appreciated.
I don't think you can fix that.
It's caused by halos rendering with the wrong FOV. ( It uses your view's FOV instead of the view models FOV )
[QUOTE=Robotboy655;48615474]I don't think you can fix that.
It's caused by halos rendering with the wrong FOV. ( It uses your view's FOV instead of the view models FOV )[/QUOTE]
I've modified the halo.Add as well as the halo.Render function to include an FOV option, but now I need to work out a formula that works for all FOVs.
[QUOTE=Fortune11709;48615728]I've modified the halo.Add as well as the halo.Render function to include an FOV option, but now I need to work out a formula that works for all FOVs.[/QUOTE]
Well, its a bit hard, you would need to create a value for each resolution since it changes from res to res.
Sorry, you need to Log In to post a reply to this thread.