Putting this in BP area, but it may be a generic networking issue, I haven’t tried with c++.
Version: 4.7.3
Platform: Mac & Win
Description: When you possess pawns and characters, at least on the client, you have a few issues.
Here’s what this repro project is trying to do:
- Move your character (cylinder) to a death zone
- Unpossess character but leave it there
- Possess a “spectator pawn” (sphere) and place it on the same spot of the character (i.e. should be seamless)
On the server, it works. Here’s what the initial state is:
Here’s what the end state should be:
Set Run dedicated server, in order so that the editor is showing you a client.
Bug A: spectator pawn is a class that extends Pawn
Make sure you have MyPlayerController.BeginPlay store a MySpectatorPawn.
When you have this situation, the set position of the pawn doesn’t work, and you’ll get this:
Notice how (a) the cylinder isn’t there, it continued moving off the world, and (b) it didn’t place the spectator pawn on the spot that cylinder died on.
Bug B: spectator pawn is a class that extends Character
First go to MyPlayerController.BeginPlay and spawn a MySpectatorCharacter instead.
In this case, you’ll get the right end state (except for the cylinder keep moving):
However, there’s another issue. For at least 1 frame, the camera will render something else. So instead of a smooth transition like you have on the server (i.e. if you do the same not running dedicated server), you’ll get 1 or 2 frames rendered with some other camera (I assume the player controller’s) before using the spectator pawn camera.
Here goes the [repro project][5]. If you have any questions let me know.
Regards,
Nuno Afonso