When I use ply:SetViewAngles( Angle( lolrecoilcode ) ) to do recoil it fucks up for clients on a server, in singleplayer the recoil works correctly, but not on server clients, their view is sort of jolted back and forth as they fire, resulting in an ugly jarring and difficulty using weapons in combat. My guess is that the recoil code reaches the server, then comes back to the player after their view has changed, then resets it.
Is there a workaround for this?
Try using the function ViewPunch instead [url]http://wiki.garrysmod.com/?title=Player.ViewPunch[/url] it's pretty much one of the reasons that function exists.
As I've seen, ViewPunch only moves the camera, not your actual aim ...
Try this in your console: lua_run timer.Create( "test", 1, 100, function() player.GetByID(1):ViewPunch( Angle( -10, 0, 0 ) ) end )
Then continuously fire with a gun like the SMG and see. Use a wall to see where the bullets hit.
I tested it before my initial reply. However it doesn't work on a weapon from the cs weapon base. He didn't specify what base he was using so I thought at least mentioning it was acceptable.
View punch doesn't change where you're aiming. I've used it extensively, it's shit.
I'm doing the recoil myself from scratch in my own base.
Sorry, you need to Log In to post a reply to this thread.