Replays are choppy with VR

Hey all,

Not sure if any of you have tried using the demorec/demoplay features for network replays with a VR headset. I have a simple setup where the headset position/orientation of pawns is updated every frame across all clients. If I test it, it runs fine and all the replicated headsets move smoothly. It is my understanding of UE4’s replay system that it just plays back network traffic. So if things looked fine in a networked game, it should look find in a replay.

However, when I go to demoplay a session that I recorded, the pawns move in a very choppy way. It’s as though they are running at 8fps. The strange thing is that I can move around the scene no problem with high fps, it’s just the replicated actors in the replay are stuttering all over the place. I don’t get that issue for non-vr pawns.

Anyone encounter something similar, or know of something obvious I may be missing?

1 Like

Found it! Turns out there is a sampling rate parameter, and by default it was set to 8Hz. The console command demo.recordhz 60 run before starting the recording made everything nice and smooth. The docs for this stuff are pretty nonexistent.

Hope this helps someone else!

3 Likes

I lost a lot of time thinking I’m doing something wrong. So thanks!

That was very used to me! Thank you!

Lost a few hours thinking I messed up the networking replication code… demo-recordhz fixed the issue!

I found another parameter, there is also demo.MinRecordHz and setting this to higher value may also help:

  • demo.RecordHz - max number of frames recorded per second
  • demo.MinRecordHz - min number of frames recorded per second