Trigger not Triggering

I have a very simple trigger scenario that I just can’t get to work.

The scene has a box collider/rigidbody object falling onto a trigger object called “enemy”. Enemy object has the following script, but nothing happens when they collide. I don’t even get the debug message.

void OnTriggerEnter(Collider other) {
	Destroy(other.gameObject);
	print ("triggered");
}

Just to confirm, yes, my trigger object has a box collider that is marked as “is trigger”

** Thanks guys, I am not at my computer right now, but I think Basen found the problem. I’m using 2D colliders, but wasn’t using OnTriggerEnter2D

Do you have the appropriate setup?
OnTriggerEnter(Collider other) + RigidBody+ BoxCollider for 3D
OnTriggerEnter2D(Collider2D other) + Rigidbody2D + BoxCollider2D for 2D

Both your objects have colliders right?

When you checked your ‘is trigger’ box you were in EDIT mode right and not PLAY mode?

If you make any adjustments while in play mode they are not permanent and will be un-done once you go back into edit mode.

Make sure at least one object has a rigidbody. Make sure both objects have colliders.

Try adding a tag to narrow things down -

void OnTriggerEnter (Collider other) 
	{	
		
		if (other.tag == "InsertTagName")
		{
			Debug.Log("Has Triggered");
            Destroy(other.gameObject);
		}

:slight_smile: