Is there a way to disable weapon bobbing for ALL weapons temporarily? I've tried LocalPlayer:GetActiveWeapon().BobScale (and SwayScale), but neither are set.
[QUOTE=jackwilsdon;45307077]Is there a way to disable weapon bobbing for ALL weapons temporarily? I've tried LocalPlayer:GetActiveWeapon().BobScale (and SwayScale), but neither are set.[/QUOTE]
Just because they aren't set it doesn't mean that setting them to 0 won't have an impact. Have you tried it? Other then that I have no how to do it.
[QUOTE=Dinnanid;45307388]Just because they aren't set it doesn't mean that setting them to 0 won't have an impact. Have you tried it? Other then that I have no how to do it.[/QUOTE]
It won't have any effect on HL2 weapons.
[QUOTE=Robotboy655;45307404]It won't have any effect on HL2 weapons.[/QUOTE]
True, I hadn't thought about that.
Edit: I found this. Although I don't know if it does either: [URL]http://facepunch.com/showthread.php?t=1263488[/URL]
[QUOTE=Dinnanid;45307410]True, I hadn't thought about that.
Edit: I found this. Although I don't know if it does either: [url]http://facepunch.com/showthread.php?t=1263488[/url][/QUOTE]
Turns out it's even simpler than the one posted (the one posted doesn't actually work).
[code]local function CalcViewModelView( wep, vm, pos, ang )
return pos, ang
end
hook.Add( "CalcViewModelView", "CalcViewModelView:NoBob", CalcViewModelView )[/code]
[editline]6th July 2014[/editline]
Damn, turns out that when you go into third person, it crashes.
[code]if SERVER then return end
model = Model("models/VGUI/bloodanimation.mdl")
function HUDPaint()
local ply = LocalPlayer()
-- I know I shouldn't do this here, but it's just here whilst testing
ply:GetViewModel():SetModel(model)
ply:GetViewModel():DrawModel()
end
hook.Add("HUDPaint", "HUDPaint", HUDPaint)
local function CalcViewModelView(wep, vm, pos, ang)
return pos, ang
end
hook.Add("CalcViewModelView", "CalcViewModelView:NoBob", CalcViewModelView)[/code]
Sorry, you need to Log In to post a reply to this thread.