Request to improve Ghost Relevancy feature

@timjohansson @CMarastoni Currently how Ghost Relevancy feature works is it will just destroy the entity when the ghost is out of Ghost Relevancy range which make it really hard to use and not really usable. There’s a lot of code I need to change just to enable this feature. If not I will get insane amount of errors when enable Ghost Relevancy feature. Instead to do that, I want you to change how Ghost Relevancy feature features works. When the ghost is out of Ghost Relevancy range, it will just add component like DisableGhost to entity and the entity will still remain at client. When ghost is in range, it will remove DisableGhost component. And also I think you can change to enable/disable component at dots 1.0 release.

What is this “Ghost Relevancy” feature you speak of? I’ve never heard of it, can you point me to the docs?

Can you describe the problem with more detail? What kind of errors are you getting and why? What kind of code do you need to write to work around them? How would you use the disabled ghost tag?

It is important that ghosts which are not relevant are not visible and do not affect the simulation since they are not updated when irrelevant and can have out-dated positions and state. So at a minimum they would need to be disabled by default, but if we disable them you might run into similar issues depending on what issues you are seeing. Disabling them also means we need to handle despawn of them - which give the client some information about irrelevant ghosts, since they are primarily intended to prevent cheating that is not ideal.

There is not a lot of docs on relevancy yet, but there is a sample using it:
https://github.com/Unity-Technologies/multiplayer/blob/master/sampleproject/Assets/Samples/Asteroids/Server/Systems/ShipRelevancySphereSystem.cs

The sample lists all irrelevant ghosts in the set, but it is possible to instead list all relevant ghosts (meaning everything not listed is irrelevant) by using a different value for GhostSendSystem.GhostRelevancyMode

2 Likes