Rotating a Projector Shadow blob Z to align with the Y axis of the object its following

I have a projector rotated 90 degrees in X(PITCH) so its Z(ROLL) axis is facing the ground.

It follows an object as it moves around with a Y offset.

shadow.transform.position = new Vector3(transform.position.x, 
                                        transform.position.y + yOffset,

I want the projector to rotate around the Z(ROLL) axis to match the objects Y(YAW) axis.

This is to make the shadow shape align correctly as it is not just a blob but a defined shape.

I tried this:

shadow.transform.rotation = new Quaternion (shadow.transform.rotation.x, 

Thinking I could just copy the Y into the projectors Z.

This doesn't work, does anyone know of the proper method to perform this sort of thing?

Turned out to be very simple

shadow.transform.localEulerAngles = new Vector3(shadow.transform.localEulerAngles.x, transform.localEulerAngles.y, shadow.transform.localEulerAngles.z);