strange launch code

Hi there guys

For some reason my launch animation only triggers when I press the “w” kay TOGETHER with the “c” key. I want it to trigger only when I press the “c” key. Can someone please help! Thanks

if (Input.GetAxis ("Vertical"))
		{
		
		transform.Translate(Vector3(0,0,speed) * Time.deltaTime);
		
		}else{
	animation.CrossFade ("idle");
		}
		
	if (Input.GetAxis("Horizontal"))
	{
		myTarget.rotation.y += Input.GetAxis("Horizontal") * Time.deltaTime  * 2;
	}

	if (Input.GetKeyDown("c"))
	{
		animation.CrossFade ("launch");
		isThrust = "true";
		constantForce.force = Vector3(0,5000,0);
	}

	if (Input.GetKeyUp("c"))
	{
		isThrust = "false";
		constantForce.force = Vector3.up * 0;
	}

You’re crossfading Idle in if there’s no vertical input. Don’t crossfade Idle in if you’re launching, or set the launch animation layer higher than the Idle animation layer.

Thanks Vicenti

I kinda understand, can you maybe give me a simple example?

Thanks

Is the code you’ve posted exactly the same as the code in your project? If you have the “if (Input.GetKeyDown(“c”))” statement inside the “if (Input.GetAxis (“Vertical”))” block, then this would work only when you press W, S or the up/down arrow keys.