Hello,
I have a VR application I am trying to feed stereo video to the perspective eye;
Leye = new Material(getAssetManager(), “jmevr/shaders/Unshaded.j3md”);
Reye = new Material(getAssetManager(), “jmevr/shaders/Unshaded.j3md”);
viewLeft = VRApplication.getLeftViewPort();
viewRight = VRApplication.getRightViewPort();
quad1 = new Quad(16, 9); // replace the definition of Vertex and Textures Coordinates plus indexes
geo1 = new Geometry("leftQuad", quad1); // using Quad object
geo1.setMaterial(Leye);
quad2 = new Quad(16, 9); // replace the definition of Vertex and Textures Coordinates plus indexes
geo2 = new Geometry("rightQuad", quad2); // using Quad object
geo2.setMaterial(Reye);
geo1.setCullHint(Spatial.CullHint.Dynamic); // make sure we see it
geo2.setCullHint(Spatial.CullHint.Dynamic); // make sure we see it
viewLeft.getCamera().getLocation();
viewLeft.getCamera().getDirection();
viewLeft.getCamera().getFrustumFar();
viewLeft.attachScene(geo1);
viewRight.attachScene(geo2);
I see the video( frames actually opencv,grabs frames from video, AWTloads it to texture)
The Problem is the quads dont move with the head movement in the VR? I have attach them and they show, but dont move with the view in my head set. What do I need to do to make the quads stay in view and move with the view in the headset?