Download

Line of sight replication problem

Hi, this is my first time posting on the forums :grinning:

I am new to games development so my knowledge around replication and the unreal blueprints isn’t the best.

My goal was to create a simple top-down shooter with line of sight elements. My problem lies with the replication. All players are hidden by default. Each player has a line of sight anything that is not in the line of sight is hidden. When other players enter the line of sight I simply display those players meshes.

As it stands this is what my code does:

All clients can see the server:

None of the clients can see each other and the server cant see any of the clients:

The problem could have a very simple solution but I simply have been just wasting too much time trying to solve it on my own (my brain is fried) :grin:

I used a custom pawn sensing component rather than the default pawn sensing component. I did this because the default pawn sensing component has “On See Pawn” but doesn’t have when Pawn is Not seen. I tried using branches and determining if the pawn was not in sight but making a custom component and having a simple bool seemed to work for me. ( I would however revert back to using the default pawn sensing component if it solved my issue.)

Here are the blueprints.

Pawnsensing component:

player character:

function to hide meshes:

If anyone has any suggestions on how I could solve my issue or even how a workaround to achieve the result that I want then I am open to any suggestions :grin:

Thanks for taking the time to read my post.

Is there something I don’t understand, because the Netmode in all its captures is the server? even customers?

image