Input.GetAxis and assigning values in if condition


I have a problem.

I have this piece of code

void Update () {

				_isQuickTurningLeft = true;
				_moveVector = new Vector3 (-speed, destinationY, -quickTurnSpeed);
				_quickTurnStart = Time.time;
				print ("turn");

Why I’m getting “turn” printed every frame although I set _isQuickTurningRight to true to prevent executing the code untill _isQuickTurningRight is assigned false in other part of class? I’m trying to use trigger as button on Xbox controller that is recognized by unity as axis, but I don’t know why values assigned in if(Input.GetAxis()) are not permanent.

Thank You.


I believe you have a copy/paste mistake on lines 3 and 7?