Quantcast
Channel: Answers by "Vandarthul"
Viewing all articles
Browse latest Browse all 86

Answer by Vandarthul

$
0
0
Your OnTriggerEnter and OnTriggerExit callbacks don't control the Collider. Tag your Player as "Player" and do this modification : void OnTriggerEnter(Collider other) { if(other.CompareTag("Player")) { inTrigger = true; } } void OnTriggerExit(Collider other) { if(other.CompareTag("Player")) { inTrigger = false; } } This way you control if the object being entered in Key trigger is player.

Viewing all articles
Browse latest Browse all 86

Trending Articles