Hi all! I searched all over and I just couldn’t find what I need. I want the Player of my game to be able to click on a door and open it, but only when he/she is in a trigger. I have this so far:
function Update ()
{
if ( Input.GetButtonDown("Fire1") ) {
animation.Play("dooropen");
}
}
but how would I make it only so it can be opened when the player is standing in the trigger? Can anyone link tutorials or script references? I’m been searching and just can figure this out. Thanks!