Quantcast
Channel: Questions in topic: "javascipt"
Viewing all articles
Browse latest Browse all 1875

Trigger not detecting tag

$
0
0
When a car passes though the trigger only my one should debug but the other cars with different tags debug and i do not know why? here is my script #pragma strict var Lap: int; function Start () { Lap = 0; } function Update () { if (Lap ==3); } function OnTriggerExit(other : Collider) { if(other.tag == "Player"); Lap++; Debug.Log("Passed though"); }

Viewing all articles
Browse latest Browse all 1875

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>