Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

see through the wall

Discussion in 'General Graphics' started by fastcoder, Aug 11, 2016.

  1. fastcoder

    fastcoder

    Joined:
    Sep 20, 2013
    Posts:
    15
    In my game, I want the player to have xray capability and see through a wall.

    However, the building model is a complete whole mesh, therefore disabling the mesh is not an option. I plan to calculate the volume that contains the wall, and tell unity not to render polygons in this volume. Is there some method to do that? any suggestions?
     
  2. raphael-ernaelsten-heaj

    raphael-ernaelsten-heaj

    Joined:
    Mar 9, 2016
    Posts:
    78
    Make a shader who use custom parameters (cylinder, cone, sphere ...) to make pixels transparent based on their world space position ;)
     
  3. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,238
    Look for cross section shaders as an example.
     
    BrandyStarbrite and warthos3399 like this.
  4. toorican

    toorican

    Joined:
    May 25, 2018
    Posts:
    16
    Last edited: Nov 2, 2021
    warthos3399 likes this.