- Home /
 
 
               Question by 
               SmallLion · Dec 08, 2020 at 04:12 AM · 
                player movement  
              
 
              Level complete when obstacles pass the Trigger!
This is my first game.I put a GameEndTrigger to complete level.But When obstacles passed it,they give a msg "Level completed".Plz help me.
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by SmallLion · Dec 08, 2020 at 05:53 AM
I found!I added a tag to player object.
 private void OnTriggerEnter(Collider other)
 {
     if (other.tag=="Player")
       Debug.Log("You Win")
 
               }
Your answer