Hello,
I am having trouble with the Input.GetKey
commands, Input.GetAxis
works fine.
Also the Input.GetKey(Keycode./* all combinations*/)
doesn’t work.
My Code:
function OnTriggerEnter( col : Collider){
nameText.SetActive(true);
if(col.gameObject.tag== "Player"){
Debug.Log("In trigger");
if(Input.GetMouseButton(0)&& !showLoot){
Debug.Log("In trigger and clicked");
animation.Play("open");
yield WaitForSeconds(2);
showLoot =true;
_showLoot = showLoot;
PlayerInventory.isViewingOther = true;
PlayerInventory.inventory = true;
}
}
}
hope you can help me