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;
}