w in Quaternion?


-first of all what does the w do in Quaternions and what does it do to my x,y,z values?

-second I have ths line of code with this I want to turn an object 90°. but the w value fcks it up so do you know what value I best give to my w. or another function I can better use to turn my objects.

transform.rotation = new Quaternion(transform.rotation.x + rotationOfBlock.x, transform.rotation.y + rotationOfBlock.y, transform.rotation.z + rotationOfBlock.z, 1);

only a crazy person or mathematical genius would attempt to change the w value. convert it to Euler Angles that will give you a Vector 3 instead
//assuming were rotating on the y axis
transform.rotation = transform.rotation.eulerAngles + Quaternion.Euler(0,90,0);