I am building an AR application using playcanvas with an 8th wall. I am facing an issue with camera render. App has 2 modes of AR and Non-AR(3D-view) mode.
The app starts in AR mode so we can place the content in the world space. All okay until here. But when I switch to Non-AR mode then I stopped the 8th wall camera with XR8.pause() then the camera stop and store the last frame information. I need to clear the camera to render before the camera start renders 3D-view.
I tried to activate the sphere so the user can’t see the last frame info but the transparent object clip the sphere and show the last frame info.
// initialize code called once per entity
Main.prototype.initialize = function() {
var camera = this.entity.findByName('Camera').camera;
if (this.app.touch) {
this.app.touch.on(pc.EVENT_TOUCHSTART, function () {
if (!XR8.isPaused()) {
XR8.pause();
camera.clearColor = pc.Color.BLUE;
} else {
XR8.resume();
camera.clearColor = new pc.Color(0, 0, 0, 0);
}
}, this);
}
};
Thanks for the effort. I used that code but still not working. camera not clear the last frame feed info . Even I hide the camera feed info put a big sphere(skydome) side. but if we have transparent objects then that transparent object over clip the skydome.
To resolve this either clear the camera info or something else so transparent object can’t overclip the skydome. please suggest.
It works fine on my phone. When I tap the screen, the background goes solid blue.
If that’s not working for you in your own project, I need a reproducible project that easily shows your issue. The one you shared before unfortunately doesn’t do that.
If you do run into anymore issues, it would really help to have a test case project that I can work against rather than guessing what the issue is here.