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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Syncvar update condition / visibility / fog of war

Discussion in 'Multiplayer' started by _FLX, Apr 10, 2016.

  1. _FLX

    _FLX

    Joined:
    Nov 10, 2015
    Posts:
    85
    Hi,

    I'm using SyncVar and a hook to update clients states from an authoritative server.

    I would like to implement an "unhackable" fog of war. I want the server to check the distance between non-local and local player and trigger that syncvar hook only if the distance is far from camera or/and in the fog.

    I have read about NetworkProximityChecker in doc, but I think it works only with NetworkTransform and I want to avoid that.

    Is there a way to make syncvars update only visible players ? Or do I have to rewrite everything with low-level stuff ?


    Thanks;
     
  2. _FLX

    _FLX

    Joined:
    Nov 10, 2015
    Posts:
    85
    Bump :)
     
  3. 6565

    6565

    Joined:
    Feb 17, 2013
    Posts:
    19