- Home /
Ignore Collision after passing a collider
Hello, I have this object
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?
Answer by Dreamblur · May 28, 2011 at 09:16 PM
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.
Your answer
![](https://koobas.hobune.stream/wayback/20220612091303im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Tipping a cube over 2 Answers
Why is it so fast to move objects with collider collisions? 1 Answer
IsTrigger problem 1 Answer