invisible walls

how can i make invisible walls so i dont have to put a huge rock face to keep the player out of the end of the map

make wall shaped cubes and in the inspector uncheck mesh renderer

Use a cube as your wall

and in the inspector UNCHECK the MESH RENDER

66003-m.png

AND ALSO IN LAYER CHOOSE TransparentFX

66004-l.png

 m.png (10.0 kB)

 l.png (10.7 kB)

I found that using a single cube works not, cos the BoxCollider fills and collides with everything inside it.

Make a prefab with 4 cubes under an empty gameobject. Remove the cubes’ Mesh Filter and Mesh Renderer. Leave the BoxColliders. Mould the cubes into flat “fences”. Give them coordinates to match the grid. I used a length of 50 each, rotated 2 of them 90 degrees, place them at 25 and -25… you get the picture… until they form a rectangular closed fence.

You can reuse the prefab and scale it to desired dimensions.