- Home /
[Unity5 C#] OnTriggerEnter not working
 using UnityEngine;
 using System.Collections;
 
 public class packs : MonoBehaviour {
     [SerializeField]
     private GameObject pack;
     [SerializeField]
     private GameObject sPoint;
 
     void OnTriggerEnter(Collider toxunan)
     {
         if(toxunan.gameObject.tag=="Player")
         {
             Instantiate(pack, sPoint.transform.position , sPoint.transform.rotation);
             Destroy(this.gameObject);
             Destroy(sPoint);
         }
     }
 }

Please help me how to fix this ?
 
                 
                1.png 
                (377.2 kB) 
               
 
              
               Comment
              
 
               
              Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                