- Home /
Question by
arianaa300 · Jun 22, 2016 at 01:39 PM ·
unity 5vrvideospherevideotexture
Multiple 360 VR video player in Unity
I already know how to implement a 360 equirectangular VR video player in Unity3D as the code below shows (by following the steps here). Now in my case, I have the same equirectangular video tiled into two parts (left-half and right-half), and want to map both to the sphere (two players glued together) and play as if the user is watching a single video. Ideally there should be no sync issues (I tested this on 2D media player and it's perfect; you can not say the video is cut into two haves!). How can I do that in Unity3D?
I thought it is as simple as drag-n-drop whatever videos we have into the surface of sphere, but not sure if it is that simple.
using UnityEngine; using System.Collections;
public class VideoViewer : MonoBehaviour
{
public GameObject leftSphere, rightSphere;
void Start ()
{
((MovieTexture)leftSphere.renderer.material.mainTexture).Play ();
((MovieTexture)rightSphere.renderer.material.mainTexture).Play ();
}
}
untitled.png
(208.6 kB)
Comment