Collision Wierdness

Hi,

I have a system set up at the moment where if my projectile collides with anything it creates an explosion effect.

The thing is when i fire on my enemies that have a character controller sometimes it triggers the explosion other times it just goes strait through about 5 of them sometimes more before it explodes, yet the enemies detect the hit and die and also the Debug is called telling me there has been a collision. My bullet has a rigidBody attached also.

My projectile is not set as trigger also either are the characters

void OnCollisionEnter(Collision collision)
    {
        if (collision.collider.gameObject.tag == "Enemy")
        {
            Debug.LogError("Fuck you i am working");
        }
        ContactPoint contact = collision.contacts[0];
        GameObject explosion = (GameObject)Instantiate(impactEffect, transform.position, Quaternion.identity);
        Destroy(gameObject);
    }

This is very common issue everyone experiences. Physics engine is very expensive process and it ignores fast moving objects sometimes. (Because of its design)

Try changing the CollisionDetectionMode of RigidBody. And don’t forget to read about it. There are different options for different situations.

Also, lowering the Fixed Timestep in time settings may help but don’t forget that lowering it costs performance lose.