I Am trying to make a dynamic bullet spread for a 2d shooter that can handle a shotgun blast to a full 360 shot pattern. I got this far.
I have a Vector that holds the variables I need. Z= The amount of bullets shot, Y= The angle of the spread, X= The Start rotation point of the shots. The for loop will place the Arrow relative to its own position at the start for each shot (Spread X) then evenly rotate the arrow to from Start (X) To End (Y) , (Z) amount of times.
The result should be with X=337.5, Y= 45, Z=4. A 5 shot burst over a 45 degree angle centered from where the arrows start position is.
X=0, Y= 360, Z=3. A shot from each rotation point at 0,90,180 and ,240 degrees
X=45, Y= 360, Z=3. A shot from rotation point at 45,135,225 and ,285 degrees
X=0, Y= 360, Z=360. A shot from all rotation points from 0 to 359 degrees
Any help with this would be appreciated including advice on how to accomplish this a different way.