Home > Software engineering >  how can I make a player hidden by terrain always visible?
how can I make a player hidden by terrain always visible?

Time:12-06

I am making a 3D isometric game, in my game, there is a lot of holes and the player can go into them, but the problem is when he goes into one of them he becomes invisible, I can,t move the camera it will change the concept I tried using shader like the one in this Forward Renderer Data

Alternatively, you could create either a cutout or a dither shader using Shader Graph, on which there are many tutorials

CodePudding user response:

Camera GameObjects give you the option to select what layer you want them to "see" (render) using the culling mask. Think of layers as grouping GameObjects and giving that group a name.

You can have multiple cameras at the same time each one with a different name and different layer to render, or even change the viewing layer of a single camera depending on changes happening in the game.

Assign a layer tag in each of the terrain elements in your scene and have the camera render them accordingly and "cull" the rest.

Very helpful documentation on layers and camera culling mask.

  • Related