- Home /
State based Replay rewinding to any replaytime using Memorystream
I am using the MemoryStream to write the keyframe data (position/rotation) for a replay. There is an article about this approach. I also write the recorded time each keyframe.
I can control the time of the replay by a pause/play button and rewind speed slider (-5x to +5x speed). This works, but I'd like to add a timebar just like a videoplayer, but dont know how I can seek the memorysstream to find the right byteoffset depending on where I click. How can I find the nearest keyframe time so the memorystream position will set to the keyframes' byteOffset?
.
But generally spoken, is the approach with memorystream a bad choice for replay with metadata and rewinding / fast-forwarding?
Comment