Hello all, I made a script that checks if an enemy enters the “trigger” zone, and if it does it will send a message to the console, but when I used the OnTriggerEnter2D
method it didn’t work. I am moving the enemy using transform.Translate
.
void OnTriggerEnter2D ( Collider2D other )
{
Debug.Log("Test function");
if (other.CompareTag("Enemy"))
{
Debug.Log("Enemy has entered the zone!");
}
}