using UnityEngine;
using System.Collections;
public class EndLevel : MonoBehaviour {
public Transform SpawnPoint;
public int level;
void OnTriggerEnter (Collider other){
if (other.gameObject.tag == "Player") {
gameObject.transform.position = new Vector3(SpawnPoint.position.x, SpawnPoint.position.y);
level ++;
}
}
}
My trigger doesn’t get triggered with the OnTriggerEnter function. “Is Trigger” is checked on the box collider of the object, and the other is just a circle collider. Why isn’t this working?