Bullet spread using Quaternion.Euler

Having a problem setting the rotation of my bullets when they spawn. I have a ‘turret’ that rotates and the bullet should inherit its rotation but also add a new rotation that has a random value on its y-axis, this symbolizes the bullet spread. But the rotation doesn’t work. No matter how much i increase the tower.accuracy (the spread amount). Am i doing something wrong with Eulers?


GameObject bullet = Instantiate(bulletPrefab) as GameObject;

            float ran = Random.Range(-tower.accuracy, tower.accuracy);
            Vector3 spread = new Vector3(0, ran, 0);
            bullet.transform.rotation = Quaternion.Euler(turret.transform.rotation.eulerAngles + spread);

            bullet.transform.position = turret.transform.position;
            bullet.GetComponent<Rigidbody2D>().velocity = bullet.transform.up;

I’ve done spread before in the past. In this is the logic i used to do it.

/* Variables */ 
public GameObject bullet;
public float spread; // between 0 and 1;

// This is the muzzles or where the bullet comes out
// This takes out the math - just simply attach an empty object t othe end of the gun
// Make sure its facing forward from the gun
Transform shootingPoint;

void Shoot () {
	// Isntantaite the bullet
	var b = Instantiate (bullet, shootingPoint.postion, shootingPoint.rotation);
	// Randomize spread
	var xSpread = Random.Range(0f, spread) * 90;
	var ySpread = Random.Range(0f,spread) * 90;
	var spreadVec = new Vector3(xSpread, ySpread, 0);
	// Add the spread