Rendring a webcam that stands "still" - Solved
Hey! Been trying out my Oculus Rift the last few months and wanted to start to develop something for myself. I want to start off with creating an environment where I have a webcam that stands still in the environment and doesnt follow when you move your head. I have based my work on Brad Davis' example code from "Oculus Rift in Action" and the example porject called HighResWebcamDemo. So does anyone know what I need to add to the code to make the camera stand still in the 3D environment instead of following my head movement? He crates the MatrixStack as following: MatrixStack & mv = Stacks::modelview(); mv.withPush([&]{ mv.identity(); glm::quat eyePose = ovr::toGlm(getEyePose().Orientation); glm::quat webcamPose = ovr::toGlm(captureData.pose.Orientation); glm::mat4 webcamDelta = glm::mat4_cast(glm::inverse(eyePose) * webcamPose); mv.preMultiply(webcamDelta); mv.translate(glm::vec3(0, 0, -IMAGE_DISTANCE)); texture->Bind(oglplus::Texture::Target::_2D); oria::renderGeometry(videoGeometry, videoRenderProgram); oglplus::DefaultTexture().Bind(oglplus::Texture::Target::_2D); }); Any help would be appreciated!1.3KViews0likes4Comments