1. NOP

    NOP Naked Wanderer

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

    Code (Text):
    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. bazuka5801

    bazuka5801 Wood Hoarder Plugin Developer

    Watch the BasePlayer, BaseEntity and you
    will solve their problem
     
  3. Shady757

    Shady757 Airdrop Stalker Plugin Developer

    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. bazuka5801

    bazuka5801 Wood Hoarder Plugin Developer

    Its very slow) way for backward
    (more and more checks)
     
  5. Shady757

    Shady757 Airdrop Stalker Plugin Developer

    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.
     
    Brko™ and Fujikura like this.
  6. Colon Blow

    Colon Blow Airdrop Stalker Plugin Developer

    Yes, this is something I am working on with "VisualCupboard" plugin using CanNetworkTo. Still a little time before I finish it for the plugin :(