Download

About IsNetRelevantFor() And LineTraceByChannel()

Dissatisfied with the synchronization rules of UE4, I rewrite IsNetRelevantFor(). Basically, I use the server to calculate whether the player can see the actor or not. Linetrace is used. I debug it locally, and it runs normally in 3 to 10 players. However, because one computer starts up a server and 10 clients, the resources of clients should account for the majority. I’m not sure whether linetrace can support more than 5000 detections per second on the server - does it use CPU or GPU? Is it possible to install multiple graphics cards?

Also, there seems to be no setting that allows us to control how often IsNetRelevantFor() is called. On my debugging machine, each player can detect each object hundreds of times per second, but in fact, about 30 times is absolutely enough. If you call a high cost operation on this function, it will lead to meaningless consumption.

Finally, in my test, when the return by IsNetRelevantFor() is changed to false, the synchronization does not stop immediately, but will delay for 1~2s. However, if it is changed to true, the synchronization will start immediately. If I want to achieve no delay stop synchronization, how do I need to program?