I am trying to implement some logic to hide my character to other enemy players but make It visible to my team. I experimented with the “Only Owner See” property and It hides the character mesh as I expected, however It is hidden for all but me.
I am testing this with other local players in Split screen mode. I created two base actors(one for each team) and I set them to owner respectively for each player character
Any ideas how I could achieve this behavior?
This is how I created the local player characters:
After digging into the code, I found that PlayerController class has an array with actors to ignore. I just add the actors I need to hide to this array and It works at least for Local split screen players.
/** The actors which the camera shouldn't see - e.g. used to hide actors which the camera penetrates */
UPROPERTY()
TArray<class AActor*> HiddenActors;