Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Object visible through wall

Discussion in 'Shaders' started by milo55545, Mar 12, 2017.

  1. milo55545

    milo55545

    Joined:
    Feb 28, 2017
    Posts:
    58
    I have a weapon that the player is holding, but if you walk up to a wall, the weapon clips through the wall. can someone help?
     
  2. moonflower

    moonflower

    Joined:
    Mar 29, 2015
    Posts:
    6
  3. milo55545

    milo55545

    Joined:
    Feb 28, 2017
    Posts:
    58
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    And it has nothing to do with the question you asked, in fact that shader is to do the opposite of what you're asking about. That makes everything that's behind a wall show up over it.

    Though you also did not give enough information for anyone to be able to help you. Can you post a screenshot of the problem, or describe the issue more specifically? For example, is this a weapon seen from a first person view, or third person camera? Is it a 2D game? Your initial description doesn't give any information that would let anyone know the answer to those questions, and the solutions change depending on the answer.
     
    Xepherys and moonflower like this.