spectator position in replay

Hi,
I am using the replay infrastructure and would like to change the spectator position during replay, to be the same as the camera position during record (e.g. following my main character).
Is there a way to do this in blueprint? or in c++?
Thanks a lot

1 Like

You can have an additional camera on the player, or use the existing player camera. When you are spawning as the spectator pawn you can simply set the camera view to bind to an existing player. There are various ways to set this, but I usually use the Set View Target with Blend.

Thanks for reply. I was calling Set View Target with Blend after a node where initiate the Replay (i call a method which inherits the GameInstance Replay) and this did not work. I now spawn the Set View Target with Blend from a timer and it is working.

This thread is hilarious about people who don’t want to properly explain what they do or share a screenshot with blueprint code

Recording replays in player controller (I use one function from Lyra to get list of them, but it can be done in template project by specifying the name to record into and then to read it from, see console commands in Replay System | Unreal Engine 4.27 Documentation)

To change camera, I use event in game instance because it’s persistent. Camera modes is also a thing from Lyra, but probably with standard camera component you’ll only need to call SetViewTargetWithBlend.

In the future, I’m going to move “switch camera” event from game instance into widget, along with stop, play, increase decrease speed buttons there will be change pawn button.