1. NOP

    NOP

    The plugin "VisualCupboard" uses the following code to create spheres server side, visible to everyone on the server :

    Code:
    entity = GetComponent<BaseEntity>();
                    sphere = GameManager.server.CreateEntity(strPrefab, pos, rot, true);
                    SphereEntity ball = sphere.GetComponent<SphereEntity>();
                    sphere.SetParent(entity, "");
                    sphere?.Spawn();
    Is there a way to create spheres only visible by an individual client?
     
  2. Watch the BasePlayer, BaseEntity and you
    will solve their problem
     
  3. You could probably use the hook CanNetworkTo and check if it's this sphere, and if the player matches the one it's supposed to be rendering for.
     
  4. Its very slow) way for backward
    (more and more checks)
     
  5. In my experience it's not that bad, it really depends on how fast your actual code is. Fast code is unlikely to slow down a server just because it's called a lot, Vanish uses CanNetworkTo and it doesn't seem to cause performance issues.
     
  6. Yes, this is something I am working on with "VisualCupboard" plugin using CanNetworkTo. Still a little time before I finish it for the plugin :(