How to pause/freeze the AR Camera in Unity? - unity3d

I am making an AR game with Unity.
I used the commonly used 'Time.timeScale = 1' to use the pause function,
This will turn the AR Camera screen into a black screen.
In addition, if you add the ar occlusion manager function in this state, the app will be down with the screen bugged.
When using AR Camera, what is the proper way to implement temporary suspension?
The actual screen you are viewing with AR camera should be seen with a frozen frame.
Please

What i would do is take a camera shot
ScreenCapture.CaptureScreenshot("TestImage.png");
then i would display it on a raw image
RawImage qrRenderer;
renderer.material.mainTexture = webcamTexture;
you can at that time disable youe camera
camera.enabled = false;

Related

How can I turn off camera video background in Unity ARKit

I'm trying to build a "lights-off" feature in my ARKit app, where I basically turn off the camera video background and only show my 3D content, sort of like VR.
Could someone please help me figure out how to turn off the the video background. I can see that a material called YuVMaterial is being used to render the camera texture but setting that to single color actually covers the entire screen and doesn't show my 3D content either.
You can uncheck the UnityEngine.XR.ARFoundation.ARCameraBackground component under the main AR camera, it will just render a black background.
In Unity, you can switch between cameras while using ARKit. The main camera has a run time spherical video applied to it, so it's not actually your device camera, but a rendering of what the device camera sees. By switching cameras, you can effectively "turn off" the background video image, but still take advantage of the ARKit properties. Have fun.

How to seamlessly switch between AR and VR?

How can I transition the space from AR to VR like how its done in the tango welcome app ?
The floor can still be found dynamically but how does the app transition into and out of the video overlay ?
Any virtual objects you draw will be drawn "over" the video overlay. You can animate the stencil buffer to achieve a similar effect to what is done in the welcome app.
http://answers.unity3d.com/questions/590800/how-to-cullrender-to-through-a-window.html

Rendering video overlay with other unity cameras

I have a question about video overlay function of tango in unity.
I want to display video overlay image with NGUI elements.
When I turn on 'Enable video overlay' options in TangoApplication script, displays of other camera in unity scene are disappeared except UI created by Unity itself.(OnGUI and UGUI componets)
Is there a way to use other unity cameras with video overlay?
please, answer.
Thank you.

How rotate camera on one touch (in Unity3d, with camera Perspective)

I making viewer big model in Unity3d for mobile.
How rotate camera on one touch around self
Here is doc about TouchInput Unity Doc. E.g You can count screen width and hight to angle and rotate camera object. Or You can use one of assets from Asset Store e.g : Simple Touch Camera Script

Locate Metaio camera on a fixed position as gui texture + Display one object from the scene through that Metaio camera

1) I am a beginner to using Metaio in Unity, so my question is that is it possible to include two cameras on my scene: one is the main for 3D environment, and another camera (metaio camera) to display objects from Unity on the real world that must be fixed on the top wright corner as UI plane of my game. Something like in the picture below:
2) Also, how to display on the metaio camera view on the scene instead of displaying all scene objects as shown in the image below, although I only attached one cube object under metaio tracker:
Any help or answers gratefully received.
Thanks.
you have to attach an script to that plain and add the code bellow to that script:
void Start() {
WebCamTexture webcamTexture = new WebCamTexture();
renderer.material.mainTexture = webcamTexture;
webcamTexture.Play();
}
if you working for android you have to add camera permission to you manifest.
i think you need to work on it, because it doesnt work simply and you have to play with camera positions and to work very well.
this link shows you camera options that you have in unity:
http://docs.unity3d.com/ScriptReference/WebCamTexture.html