creating imaginary boundary for contoured surface

i have a contoured surface (not a standard geometry) and i have given it a mesh collider. however my player falls off the edge. is there any way to create an imaginary boundary that prevents the fall.

i have read about box and other colliders and they work well for standard geometrical shapes. since my surface is not a standard geometry as shown below, i hope there is a better way to create boundaries.

5961488--639167--Capture.PNG

ok . make another mesh by extruding edges and then disable renderer component

1 Like

you are a genius