Description

Actors not marked as Always Relevant do not replicate to Clients that have possessed a vehicle past 15,000 units (the sq root of Net Cull Distance Squared) of the point of possession. Note that replication fails even if both Server and Client remain close to each other before reaching 15k units from the point of possession.

While conversing with the user on AnswerHub, the following was revealed:

"I ran a test and as suspected, the FNetViewer "ViewLocation" data in GetWorld()>GetWorldSettings()>ReplicationViewers for the client stops updating once the vehicle is possessed. So the frame of reference to view other actors isn't being updated to recalculate the relevance distances."

"The problem is in the APlayerController::GetPlayerViewpoint override. or Actually in the PlayerCamerManager->GetCameraViewPoint specifically. It doesn't reliably set the out_Location variable for possessed vehicles. It seems to work for the camera, but not for the relevance test that also uses this function."

More information on the AnswerHub post linked above, including a "hacky" workaround.

Reproduced in 4.9.2 binary and Main (CL 271952)

Steps to Reproduce

1. Download and open the attached project
2. PIE with 2 players
3. On the Server, possess one of the vehicles by aiming with the mouse and using the Left Mouse Button
4. Drive the vehicle to about 10,000 units from the point of possession
5. On the Client, possess the other vehicle
6. Drive the vehicle to the Server's vehicle
7. On both Server and Client, crash the vehicles into each other and move around, noting that both replicate as expected
8. Move both vehicles past 15,000 units
9. On the Server, crash the vehicle into the Client's vehicle

Result:
The Server vehicle is not replicated properly to the Client

Have Comments or More Details?

Head over to the existing AnswerHub thread and let us know what's up.

14
Login to Vote

Fixed
ComponentNetworking
Affects Versions4.9.24.114.13
Target Fix4.21
Fix Commit4297412
Main Commit4352452
Release Commit4399518
CreatedOct 20, 2015
ResolvedAug 17, 2018
UpdatedFeb 15, 2019