Keep an object inside certain bounds

Hi,

I have a scene with a moving GameObject. I want this GameObject to be inside a certain space (invisible walls). This space is circular.

I tried to create an invisible cylinder (MeshRenderer deactivated) with a Mesh Collider to define those bounds, but my collider isn’t working as I expected, it lets my object go through it. My guess is that the collider only works with outside collides, not inside. How can I fix it?

My floor collider works fine.

Be sure your object does have a Rigid Body attached.

Maybe that helps you.