
Originally Posted by
D3M0L1T10N
Code:
ucmd:SetViewAngles(Lerp(0.05, ucmd:GetViewAngles(), angle))
???
You know how LerpAngle works right? Look at the example on the page you JUST linked me. It's an angle and you're calling Lerp on it, LerpAngle isn't actually a function afaik, it's just calling Lerp inside of an angle that makes it "LerpAngle"
EDIT:

I was wrong, I still don't understand why they used Lerp instead of LerpAngle on the examples page for LerpAngle...weird.
EDIT2: LerpAngle uses the exact same arguments as Lerp, that might be why they used it for the examples page, not sure what the difference is.
EDIT3: Nevermind, I see it now. Thanks'd.
EDIT4: Thought I'd add a little bit more info here, you can actually achieve that pseudo-RCS that I did by taking your weapons recoil and subtracting it from your aimspot, so that once you reach maximum recoil (which is usually pretty quick) you will be on their head, it's pretty useful because if you Lerp it you can make it look like you're legitimately controlling the recoil, the way I'm doing it doesn't account for horizontal recoil however, you'll have to find your own way of doing that, I tried taking my current angles and my old angles and then subtracting the difference from the, but as you can probably guess, it didn't work very well because if your yaw axis moved at all it would rotate back. You could use the pitch to do something like that properly, but I'd imagine it wouldn't work very well if there was a sudden kick in recoil, and as for PunchAngle recoil, I have no clue how I plan to compensate for it.
The problem with doing it my way is that if the recoil is substantial, it won't work properly because you'll be aiming beneath the target, I'm still trying to think of a way to properly compensate for recoil like that of in CS:GO/CS:S cheats.