The plugin "VisualCupboard" uses the following code to create spheres server side, visible to everyone on the server :
Is there a way to create spheres only visible by an individual client?Code:entity = GetComponent<BaseEntity>(); sphere = GameManager.server.CreateEntity(strPrefab, pos, rot, true); SphereEntity ball = sphere.GetComponent<SphereEntity>(); sphere.SetParent(entity, ""); sphere?.Spawn();
Creating a sphere entity only visible by the client
Discussion in 'Rust Development' started by NOP, Jan 11, 2017.
-
Watch the BasePlayer, BaseEntity and you
will solve their problem -
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.
-
(more and more checks) -
-
Yes, this is something I am working on with "VisualCupboard" plugin using CanNetworkTo. Still a little time before I finish it for the plugin