Quaterion is rotating my character improperly?

When I hit trigger.
Trigger is to rotate my character 90 degrees on the y axis.
But for some reason it’s rotating my character 180 degrees.
I double checked there is no duplicate of the trigger… and the scripts only on the trigger…
Ive tried setting the Quaterion to 45 just to see if it made a difference, but it doesn’t, so I need advice.

Heres my script

private var turn = false;
function OnTriggerEnter (other:Collider){


	if(other.CompareTag("SSPlayer")){
		turn = true;
	}
}

function LateUpdate(){
var player = GameObject.FindGameObjectWithTag("SSPlayer");
		
	if(turn == true){
		player.transform.rotation = Quaternion(0,45,0,0);
   	    var cam = GameObject.FindGameObjectWithTag("CamToggle");
	    var cs = cam.GetComponent(CameraToggle);		
		cs.CamSelect = 1;
		var ssp = GameObject.FindGameObjectWithTag("SSPlayer");
    	var sp1 = ssp.GetComponent(SSController);
    	sp1.cont1 = 1;
    	var sp2 = ssp.GetComponent(SSController2);
    	sp2.cont2 = 1;
    	turn = false;
	}
}	

Thanks in advance to anyone who answers!

Quaternions are not what you think they are. Quaternions are an odd 4D space that will never faulter when doing rotations, but as a result it has absolutely nothing to do with Eulers Angles (which you are currently using). I lied a little in that there are links between the two, but you will have to learn the math from wikipedia or khan academy if you really want to use it.

What you want is the rotate method in the transform class.

transform.Rotate(0,90,0,Space.Self);

each class has tons of useful methods and variables in the API.

For instance: transform has Rotate, RotateAround, Translate, ViewportToRay, etc all of which you can see here.