OnMouseOver on a mesh (object)

So, here’s the scenario:

I have a 3d table (mesh), as in kitchen table. If I place it above the terrain mesh, OnMouseOver works perfectly. If I place it THROUGH the terrain mesh (but half of the table can still be seen and targeted with the mouse cursor), OnMouseOver does not work.

Could anyone explain the phenomenon to me? And a possible solution?

Thanks!

OnMouseOver makes use of the GameObject’s collider; you’re probably giving Unity’s collider calculations a hard time by intersecting them.

Take a good look at your colliders and see if there’s a reason for Unity to get confused.

Your colliders might be a little off. Either the positioning or the scale of the collider you’re using might not be the same as your mesh. And if you’re using a mesh collider, look at your model itself. There might be some inverted vertices or geometry faults in it.