How to collide an object to a specific point?

Hello, I have a question. I’m creating a simple game with simple collision scenes. I have a game object which is a cube, and a box collider in it. If my object2 collides IN FRONT of the cube, it will bounce. And if my object2 collides in the BACK of the cube, the object2 will just pass through the cube. Any workaround for this?

So far I’ve tried making a separate collider and making it as the child of the cube. I just started learning Unity3d last 4 days so I’m still on the learning stage.
Here’s a pic for better understanding:

alt text

You could check whether the Vector3 of object2 that reflects its moving direction is < 90 degrees of the forward Vector3 of object1 (using Vector3.Angle). Otherwise object2 moves in opposite direction.