Mesh collider not working with Sphere collider

I have created a 3D space game sample where astroids are being spawned randomnly and spaceship is having a gameobject with same mesh and collider. But for some reason it is not colliding with the space ship…

I have mesh collider attached to the Gameobject and sphere collider attached to the astroids. I tried changing the gameobject and spaceship with a simple cube but it didnt work.

I have attached the images of the issue.alt text

The Collision Script is

// Use this for initialization
void Start()
{

}

// Update is called once per frame
void Update()
{

}

void OnCollisionEnter(Collision collision)
{
    if (collision.gameObject.tag == "EnemyObject")
    {
        Debug.Log("working");
    }
}

}

Maybe this is because your GameObject is the child of the player. You can try to unassign it and see if it works this way.

Thanks @WTler but I tried to collide without using the gameobject however it didn’t work for me… Any other suggestions apart from this??

I tried it myself now with a Capsule object which has a mesh collider assigned, which falls on/through a cube with a box collider assigned. I reproduced the behaviour that it doesn’t collide and I solved it by checking “inflate mesh” at the mesh collider. Tell me if it works for you :slight_smile: