How to get the point of collision when collision takes place inside the collider

Hello!
I want to register collision when it happens inside BoxCollider2D and instantiate hit effect at that point, but when I try to determine the point using collision.GetContact(0).point I receive the point which is actually outside of the box collider.

void OnCollisionStay2D(Collision2D collision) {
        Instantiate(hitEffect, collision.GetContact(0).point, Quaternion.identity);
        Destroy(gameObject);
}

I got the result:
151793-screenshot-3.png

Appreciate your help in advance, guys!

UPD: I think I can add a condition and if the bullet is inside the container instantiate hit effect at the firepoint pisition. But it seems to be a duct tape code and I’m not sure this will work.

Solved this by adding kinda duct tape code :slight_smile:
I added a trigger collider to my FirePoint object and if it’s inside of any collider I set isInsideCollider variable to true.
And then, in the bullet script I added a condition:

void Start()
    {
        if (firePoint.IsInsideCollider())
        {
            Destroy(gameObject);
            Instantiate(hitEffect, firePoint.transform.position, Quaternion.identity);
        }
        else
        {
            CreateBullet();
        }   
}

So basically I create hit effect right away. Now it looks like this:
151796-screenshot-4.png