Detect 2 non kinematic triggers?

Hello! I am making a SHMUP game, and I want the player to lose a life if it collides with an asteroid object. Unfortunately, both the asteroid and the player are triggers (the player doesn’t have to be a trigger, but I can’t get it to collide when it isn’t either), so I can’t figure out how to get the 2 triggers to collide. I read that if they have rigidbodies 2 triggers can collide, so I added rigidbodies to both (with gravity disabled), but it’s still not working. Here is the code I have attached to my player’s body:

#pragma strict
var lives = 3;

function Update ()
{
    if(lives < 1)
    {
        Application.LoadLevel ("GameOver");
    }
}

function OnTriggerEnter(other: Collider)
{
    if(other.gameObject.tag == 'Enemy')
    {
        lives -= 1;
    }
    Destroy(gameObject); //this is only here to test if the collision is working at all and it's not a problem with the above if statement, it's not going to be in the game. It still isn't working
}

Some things to check

First, make sure the enemy is tagged “Enemy”. Then make sure once more

When you tested with istrigger turned off, did you change:

function OnTriggerEnter

to

function OnCollisionEnter

The depth, if this is a 2D style game, make sure the object don’t pass each other on the depth.

Lastly, if you provide the project (or a video) I am willing to help more. Did a similar project when first starting.

I never had a problem with two triggers not seeing each other, unless they are both mesh colliders not set to convex. Could that be the case?

As you said you added rigidbody for this issue only, I assume you’re moving those objects with Translate or position += something. That kind of movement cannot raise collision event, unless it’s to move an object with a rigidbody kinematic into an other object with a rigidbody NOT kinematic.

You should use AddForce.