How to pierce a plane?

Hello,
i have made a plane, like a false barrier, and i want to pierce that plane with an other game object.
But also i want that the collision with that plane results in the script.
Thanks.

It’s a little bit hard to understand what you’re asking, but I think what you want is a Box Collider set to act as a trigger. Attach a box collider to your plane. Don’t add a mesh collider for this, because you can’t use a non-convex mesh collider as a trigger in this way. Make the collider a little bit thick, you don’t want it to be 0 width. If you’re going to have something very fast pass through it, you may need to use continuous collision detection instead of discrete.

Then, you can use OnTriggerEnter to check when it’s been pierced. If you need the hit normal, it’s a bit trickier, but possible by setting up a raycast. Let me know if this helps!

Thank you!!
Very helpful