Download

Fighting weapon recoil.

Hello All,

I’m currently working on recoil system for a FPS, I have added recoil pitch and yaw values to the controller pitch and yaw to create the recoil and then I interpolate the recoil back to zero when firing stops which works well and resets the aim to the starting fire position.

The problem arrives when I try to fight the recoil, after interpolation it is not ending at the starting position because I’m pulling the mouse around to fight the recoil. any idea how I can fight recoil but still end up at my starting position?

I did something similar and I just let the player end up at where they end up after fighting the recoil. I think it’s how any game does it really, like Counterstrike. I’m guessing what you mean is you start aiming down to counter the recoil and once done you’re now aiming at the floor a bit.

I think Crysis implements it in the way that he’s talking about. Trying to end up at the exact starting position could have some undesired effects, but if you were to keep track of the amount of total offset you were adding to the pitch and yaw and subtract it back after firing stops, then that might work.