Is it possible to control a 360 degrees video to move forward or backward in time (frame +/- 1) by the means of an event, like pressing a controller button?
The idea here is to have an environment extracted from a video. The video should not play. When pressing a button, we can go to the next/previous frame.
Is there some documentation on this? I only found the Skybox-PanoramicBeta.shader.
Have you tried doing so by pausing the video and setting the frame?
https://docs.unity3d.com/ScriptReference/Video.VideoPlayer-frame.html
VideoPlayer.frame
public long frame;
The frame index currently being displayed by the VideoPlayer. This will be 0 for the first frame of the clip, 1 for the second and so on.
https://docs.unity3d.com/ScriptReference/Video.VideoPlayer.html
Could you try something along the lines of;
public long currentFrame; // something to hold the frame that's currently paused
VideoPlayer.Pause(); // pause the video
currentFrame = VideoPlayer.frame; //set the current frame to the current frame
// then when you want to move to the next frame
void PlayNext()
{
VideoPlayer.frame = currentFrame + 1; //set the frame being played to one more than the one saved
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With