是否可以通过事件(例如按下 Controller 按钮)控制 360 度视频在时间上向前或向后移动(帧 +/- 1)?
这里的想法是从视频中提取环境。视频不应播放。按下按钮时,我们可以转到下一帧/上一帧。
有这方面的一些文件吗?我只找到了Skybox-PanoramicBeta.shader .
最佳答案
您是否尝试过暂停视频并设置帧?
https://docs.unity3d.com/ScriptReference/Video.VideoPlayer-frame.html
VideoPlayer.frame
public long frame;
VideoPlayer 当前显示的帧索引。
剪辑的第一帧为 0,第二帧为 1,依此类推。
https://docs.unity3d.com/ScriptReference/Video.VideoPlayer.html
你能尝试一下类似的东西吗?
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
}
关于unity3d - 如何在 Unity 中为桌面 VR 应用逐帧显示 360 度视频?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50851653/