"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

How to pause/freeze the camera?

Hello everyone!

 

I'm new Vuforia's user and I'm looking for a way to pause or freeze the camera without affect current AR interaction.

For instance, on mobile, we can :

1. Look at an Image Target

2. View the AR object or animation

3. Press a button to freeze the camera

4. Place our phone on the table while continuing to manipulate AR interaction

 

Can you explain me how to do it please?

Thank you!

lukesmith123

Sat, 05/27/2017 - 14:27

You can get the current camera image from CameraDevice GetCameraImage (https://library.vuforia.com/articles/Solution/How-To-Access-the-Camera-Image-in-Unity)

Then create a texture2d from the image and use this as the texture for the BackgroundPlane

lukesmith123

Mon, 05/29/2017 - 14:54

See the article I linked, you need to register a callback with the Vuforia service to set the camera pixel format first. Then also check Image is not null before using it.

ChandanSmartGames

Sun, 06/11/2017 - 10:27

Hey there!!

First include this line at the very top of your script:

Using Vuforia;

 

And then use this to freeze:

Vuforia.Instance.Pause();

 

Use this line to unfreeze:

Vuforia.Instance.Play();

 

Hello @ChandanSmartGames !

 

I tried your method, but I get an error saying that Instance in not contain in the namespace Vuforia, any idea where it could have been moved ? :)

Thank you really much !

ismaelnascimento

Mon, 03/12/2018 - 00:18

using Vuforia;

VuforiaRenderer.Instance.Pause(true);

AyreGuitar

Tue, 03/13/2018 - 13:44

Pausing Vuforia Camera using VuforiaRenderer.Instance.Pause(true); in OnApplicationPause(bool true) when app comes back from background on iOS device, but the screen is upside down.