2D Top-down Shooter: Shotgun Bullets Spread

Hello,

Having some trouble with getting a consistent spread on shotgun bullets, regardless of the direction the character is facing. What I have is fine if the character is facing vertically, but the bullets clump together when facing horizontally. Here’s what I’ve got so far.

EDIT: The distance the mouse is from the character changes the input rotation var, and consequently affects the bullet’s spread.

I’m fairly new to unity, and only understand the basics of quaternions, so a simple solution would be great. Thanks for your time!

if(currentWeaponType == "Shotgun")
{
			Debug.Log("PlayerScript.HandleBullets(): Shotgun Fired. Input rotation is:" + inputRotation);
			
			Vector3 bullet2Angle = inputRotation;
			bullet2Angle.x -= 15;
			bullet2Angle.z -= 15;
			
			Vector3 bullet2Vector = tempVector;
			bullet2Vector.x -= 0.3f;
			bullet2Vector.z -= 0.3f;
			
			Vector3 bullet3Angle = inputRotation;
			bullet3Angle.x += 15;
			bullet3Angle.z -= 15;
			
			Vector3 bullet3Vector = tempVector;
			bullet3Vector.x += 0.3f;
			bullet3Vector.z += 0.3f;
			
			
			GameObject bullet1 = (GameObject) Instantiate(bullet, tempVector, Quaternion.LookRotation(inputRotation));
			GameObject bullet2 = (GameObject) Instantiate(bullet, bullet2Vector, Quaternion.LookRotation(bullet2Angle));
			GameObject bullet3 = (GameObject) Instantiate(bullet, bullet3Vector, Quaternion.LookRotation(bullet3Angle));
			
			
}

I would tackle the problem another way.
I take it you have a shotgun prefab of some sort. You could attach 3 gameObjects to that prefab, each one facing at the desired angle of each bullet. Then you can attach to each of those 3 gameObjects a script that would spawn bullets.

Or, if you still want to play with rotations, since you’re making a 2D game, I believe you could use EulerAngles instead of Quaternions since one of your axis will never move (the main reason for Quaternions being to avoid Gimbal lock, which doesn’t occur in a 2D world).