Collider not working when I am inside model

Basically I am working on Golf Water Globe 3D game.


In this my Golf Ball can’t able to collide with Globe. I have set Golf Ball as Sphere collider and attached rigidbody as well. Globe has Mesh collider.

Golf ball is inside globe. So at present Golf Ball is not at all colliding with Globe.
Globe is open from bottom side and I double check this thing.

Tee on which Golf ball is standing that has Mesh collider, Golf ball gets collided fine with Tee.

So I am very confused in this. Please give some suggestion in this.

I would like to tell you first that


Notice immediately above where it says


Hopefully you now understand that


It is endlessly confusing that Unity included “mesh colliders” in the system, it leads to endless confusion like this. You’ll find 1000s of questions about mesh colliders where the answer is “don’t use mesh colliders”. There are some extremely unusual situations where you use mesh colliders, and you in certain situations use them for the “ground”, but generally they’re never used.

So just to begin with, regarding your tee,

#remove the mesh collider.

Use one (or maybe two) ordinary colliders to represent the tee. That’s how you make games - for example, a car would be probably two box colliders. A dog might be represented by 3 or 4 colliders (or just one if you’re not too close); and so on.

Many people don’t realise this extremely basic aspect of game engineering. It causes huge confusion.

In this case just use maybe a cylinder collider and a small box collider on top to represent the tee (or indeed - just use one trivial box collider (tall and thin) and that will very likely be fine).

So first do that.

once you’ve done that and absolutely have the tee working (properly, using perhaps one box collider), come back for the main part of your question:

Secondly, regarding your main question, the fundamental reason your ball is not colliding with the “glass” collider:

don’t forget colliders (and indeed mesh) are one-way.

#The “collison” is of course on the outside of a collider.

There’s no collision “leaving” a collider, it’s meaningless. (Just as shaders only paint one side of mesh.)

You can see this explained often, example

Note that you could indeed use it as a TRIGGER, to learn when something goes outside the collider (so, Unity - Scripting API: Collider.OnTriggerExit(Collider) and so on)

In any event, you are in the very unusual situation where you want to be “inside” a collider. It’s unfortunate that your first project where you’re just getting going – you have not yet reached the point of realising you don’t use mesh colliders in games – has this issue.

After you fix the tee as explained above,

You can easily google many solutions for “I am inside a collider” or “inside-out collider”.

Since the thing you are inside is a sphere, fortunately one solution is extremely easy:

Alternately if you want to “TURN THE MESH INSIDE OUT”,

here’s the FULL SOLUTION

To repeat, SIMPLY GOOGLE “hit mesh from inside” and you’ll find many such solutions.

@siddharth3322, simple, reverse normals of your mesh.,simple, reverse normals of your mesh.