I want to shoot a raycast to check where my gun has fired, but with the shotgun I’m going to want to randomize the precise direction of the ray slightly with each shot.
How would I do this?
Currently I use if (Physics.Raycast(shotOrigin.position, shotOrigin.forward, out hit, 1000, layerMask))
to shoot a ray straight out (forward) from the barrel of the gun with each shot, so I need to find a way to vary that “forward” angle up a little bit.