Ignore Collision after passing a collider

Hello, I have this object
alt text

so I put 2 box colliders, the collider at the left and at the right.
Now here’s the scenario,
-if the BALL collide at the right collider, the ball will pass through that collider and the collider from the left.

-if the BALL collide at the left collider, the ball will bounce.

Any idea?

Make two plane colliders (a plane collider is a mesh collider of a plane) and position them along the opposite sides of your object so that their normals face outward. Set the right collider to isTrigger. Now, assuming that your object has no other collider or that its main collider is also set to isTrigger, then the right collider should allow everything to pass through it and the object while still detecting trigger events. The left collider, which has its surface facing away from the object, should let anything coming from its back side pass through as well, while still detecting physics collisions against its surface. The bounce effect can be scripted using Rigidbody.AddForce assuming that the bouncing object has a rigidbody attached to it.