Bug in collision detection?


To remove objects that move out of the screen, I created an empty game object, then attached a collider, ticked the Is Trigger and attached a script that has collision detection for triggers and Destroy(col.gameObject) to remove whatever collides with it. Since objects that suppose to get destroyed by this do not have RigidBody, I attached RigidBody to this object, let’s call it Wall.

Strange thing is, it doesn’t destroy objects but if I slightly move this wall when objects are passing through it, it detects and destroys them all.

How can I fix it so it would detect anything passing through it without moving it?


u have to add rigid body both to trigger object and to the objects that are passing through the wall! and its goig to work 100%