How to detect the collsion in between the certain distance?

Hi all ,

I am haveing one issue regarding collision detectioin.

I have one player(Ball) and enemys(Rectangles,Circles,Semi Circles) in my game and i attached sphere collider to player and mesh colliders is attached to enemys.

My aim is i want to detect collsion while a ball hits the center of the enemys. if suppose the ball hits edges of the enemys the collsion should not happen…

Can anyone help me out this?

Thans in advance…

You could change the size of the collider if your game allows that, or you could make use of collision layers so the outside collider will be on different layer then the player and the inside collider will be on the same layer…