In my first person peer-2-peer multiplayer game, if the server player kills the client player, the client player spectates the server player until the next game starts (similar to Fortnite). This works fine on the first map, before the seamless server travel, by simply calling “Set View Target with Blend” on the server.
However, after seamless server travel and after being killed again, the client player fails to change its view target to the server player using the same “Set View Target with Blend”. I’ve looked into what the difference is between the first level and subsequent levels and found that the client player’s “player controller” on the server reports that its view target is invalid after calling the “Get View Target” and “Is Valid” commands in the Event Tick.
I believe it is the client player’s “player controller” on the server having an invalid view target that is causing the “Set View Target with Blend” to not work after a seamless server travel and the client player being killed again.
So, I have two questions:
-
Why is the client player’s player controller “View Target” invalid after seamless server travel on the server and how might I fix that?
-
Why else would “Set View Target with Blend” command, making the client player spectate the server player, stop working after a seamless server travel (it works find on the first map though)?
Thank you.