Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

[FREE] GPU Line of Sight / Field of View

Discussion in 'Assets and Asset Store' started by Tycho, Jul 16, 2014.

  1. EpicCodez

    EpicCodez

    Joined:
    Jan 30, 2020
    Posts:
    3
    How would you make it so that the fov is a different effect from the example desaturate, such as with blue hexagons? It’s amazing otherwise..
     
  2. Tycho

    Tycho

    Joined:
    Nov 24, 2012
    Posts:
    200
    You could either create a custom Image Effect to render the hexagon pattern in screen space, or render the scene twice (once with a hexagon material, and once using normal materials) and use the LOSBufferStorage and LOSMask components to combine the two renders.
     
  3. EpicCodez

    EpicCodez

    Joined:
    Jan 30, 2020
    Posts:
    3
    Oh, (sorry for all the queries) but how would you send a message to all the los sources that the player is visible too? Thanks for the quick reply, gave me some ideas. P.S. sorry, I’m quite a noob at unity... Want to make it so that the enemies that see the player react. On the enemy script I have two functions to look and shoot at the player, and wanted to call them only on the enemies that the player is visible too.
     
    Last edited: Jun 1, 2020
  4. EpicCodez

    EpicCodez

    Joined:
    Jan 30, 2020
    Posts:
    3
    One more thing, could I use a separate, inverted camera that cuts out my level to make the skybox still have colour? Will test with Unity, but wanted to check if there was an easier method?
     
  5. Tycho

    Tycho

    Joined:
    Nov 24, 2012
    Posts:
    200
    I suggest you take a lot at the PlayerInfo script included in the example scene, for a starting point on how you can implement this.
     
unityunity