Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Second Camera (Minimap Camera) occasionally not rendering markers.

Discussion in 'Getting Started' started by Tset_Tsyung, Oct 9, 2019.

  1. Tset_Tsyung

    Tset_Tsyung

    Joined:
    Jan 12, 2016
    Posts:
    364
    Hey all,

    I didn't know whether this should go in the UI forum or the Rendering Forum... so I'm putting it here...

    Basically we have a second camera (orthographic, render to texture, texture applied as transparent UI minimap) that acts as a radar, alerting the player to the location of interactable elements.

    However, for some reason, the camera will occasionally 'pop' the blue markers in and out of render, depending of the direction the player faces.
    Note: The camera ALWAYS faces downwards (negative along the Y axis) and never changes it's rotation on the X or Z axis - it just always looks down.

    Here's a gif of the problem.
    bug2.GIF

    This camera only renders a single layer which has nothing but the blue markers on. It only does this in a few places, with certain markers, but I cannot figure out what is different about these particular marker that causes this 'popping' effect.

    Does anyone have any idea where I should be looking?

    Note: I have setup debugs in as many of the scripts used with these markers as possible, and nothing is firing off saying that it's disabling the marker at all...

    As always, any and all help is appreciated.

    Mike
     
  2. Tset_Tsyung

    Tset_Tsyung

    Joined:
    Jan 12, 2016
    Posts:
    364
    [Sigh]...

    Found the issue.

    It's been nearly a week, but I've finally solved it. It was the occlusion culling - turned that off for this Minimap camera and everything works fine. No idea why this was happening.

    Anyway, I've added this 'solution' for anyone else having this issue. My Unity version is 2019.1.7f1. This was the first project that uses Occlusion culling, but there are no occlusion cull edges near this item or where the player and minimap system were placed, so no idea why it was turning this off...

    Oh well.

    All the best everyone ;)

    Mike