I’m looking at creating a small FPS game that has similar weapon mechanics to Counter Strike: Global Offensive where weapons have a predictable weapon spread.
I am wondering if anyone has any links to scripts, tutorials, or forum posts that would help with creating a similar system?
That was my original thought, but would there be a way to get it to get it to produce the same pattern every time?
A bit like the CS:GO spreads where weapons will produce a pattern like those in the link all the time?
But every-time the player fires their gun move their aim (ie the camera ) a small amount.
it seems that the guns in counterstrike have a random up amount, and a random left / right amount. When they reach a maximum vertical value they stop going up and recoil left and right.
You are going to have to give each gun a “personality” using several variables. For instance.
Vertical recoil amount per shot. say 0.1f - 0.2f
Maximum vertical recoil. say 10 or 15.
Horizontal recoil amount : say -0.1f to 0.1f
Horizontal recoil multiplier after max vertical recoil reached. 2.0f
that way you could have guns that kick hard upwards then hard left and right after a set amount of shots.
guns which kick left and right and up all the time
guns which kick up then hold at the top, all sorts.