ReplicationGraph CustomNode only works within certain range

Hello, I have made my own ReplicationGraphNode to represent an instance where clients in the same instance can only see each other.

Here is the git the test project I made. But when I try to apply this to my other project I found that it would only work within a certain range.

For example, I’d make a room 6000.f above origin.PositionZ. Put 2 clients into the same GraphNode and teleports them in the same room. They can see each other and replication works properly.

But if I make a room 16000.f above origin.PositionZ. Put 2 clients into same GraphNode and teleports them. Clients won’t be able to see each other. Although they would still collide with each other because it’s the server that handles movement.

And if I don’t reroute them into my InstanceGraphNode, just teleports them to the room 16000.f above, they would be able to see each other.

Some information using Net.GraphNode.PrintGraph

-------------- Both clients are in the world ------------------
ReplicationGraphNode_GridSpatialization2D_0
  ReplicationGraphNode_GridCell_0
    Static
    Dynamic
      World Bucket 1 [1 Actors] BP_Avatar_Gameplay_C_0 
      World Bucket 2 [1 Actors] BP_Avatar_Gameplay_C_1 
ReplicationGraphNode_ActorList_0
  World [5 Actors] WorldSettings GameState_0 PS_Utopia8_C_0 PS_Utopia8_C_1 PS_Utopia8_C_2 
Connection: NULL
  ReplicationGraphNode_TearOff_ForConnection_0
Connection: NULL
  ReplicationGraphNode_TearOff_ForConnection_1

-------------------- Both clients are in the same instance ------------------
ReplicationGraphNode_GridSpatialization2D_0
ReplicationGraphNode_ActorList_0
  World [5 Actors] WorldSettings GameState_0 PS_Utopia8_C_0 PS_Utopia8_C_1 PS_Utopia8_C_2 
Connection: NULL
  ReplicationGraphNode_TearOff_ForConnection_0
  UTO8ReplicationGraphNode_Instance_1
    World [2 Actors] BP_Avatar_Gameplay_C_0 BP_Avatar_Gameplay_C_1 
Connection: NULL
  ReplicationGraphNode_TearOff_ForConnection_1
  UTO8ReplicationGraphNode_Instance_1
    World [2 Actors] BP_Avatar_Gameplay_C_0 BP_Avatar_Gameplay_C_1 

There are 2 clients and 1 dedicated server.
BP_Avatar_Gameplay is the client player BP. PS_Utopia8 is the player state.

Anyone has any idea or suggestion on where I should look into? Asked ChatGPT but got nowhere :joy:

So I have done a bit of testing. I think this issue is related to Level Streaming. I stepped through and made sure each NetConnection has all the information from the InstanceGraphNode.

I have also stepped through the UReplicationGraphNode_GridSpatialization2D to see if I missed something. The only difference I can tell is that it is being added to global node: AddGlobalGraphNode(GridNode )

Is there something that I can set in level streaming that can help? The server treat the clients that’s too far from origin as not relevant to other clients.

Testing shows a very weird combination of camera angle and player location that whether or not clients can see other clients.

I could not solve the issue of the range limitation with custom GraphNode and LevelStreaming. As there is a hard limit of around 10,000.f of range that the LevelStreaming would consider clients in my custom GraphNode to be not relevant.

We have moved the level that requires Instance based clients near the center of the level so that it would work proper. And try to use other methods to reach our goals like Dynamic Level Streaming.

Hope this would help with anyone using ReplicationGraph and LevelStreaming at the same time.