Topic locked

[Help] Simple Device Flash

December 4, 2013 - 10:08am #1

Hello,

 

I was wondering if anyone could point me in the right direction.

 

I wish to simply use Vuforia to turn on and off the phone's light, no AR, no live camera feed, nothing, just simply turn on the light.

 

Using the included AR Camera prefab loads a bunch of behavior I just simply don't need.

 

Is there a way of accessing the torch/flash directly? without having to instance the AR Camera prefab?

 

Thanks

[Help] Simple Device Flash

May 19, 2014 - 10:39am #6

Tons of Thanks man!! \m/

I owe you a beer! :D

[Help] Simple Device Flash

December 4, 2013 - 11:28am #5

Thank you very much, I will try this!

[Help] Simple Device Flash

December 4, 2013 - 11:26am #4

You can try by just disabling QCARBehaviour, either in the inspector of the ARCamera, or with a script by retrieving the QCARBehaviour component from the ARCamera at runtime and call qcarBehaviour.enabled = false;

Then you can control the flash with CameraDevice.Instance.SetFlashTorchMode ( false / true );

You can give it a try.

 

[Help] Simple Device Flash

December 4, 2013 - 10:54am #3

Ok, then let me ask this.

 

Is there a way of stopping the camera from doing all the AR stuff? like stopping the video stream and any calculations that Vuforia is doing?

 

The Unity API lacks hardware control of the torch, and a lot of their forums point to this (Vuforia) solution. So basically, I need to control the torch with as little processing as possible.

 

Thanks 

[Help] Simple Device Flash

December 4, 2013 - 10:49am #2

Vuforia exposes the Flas torch feature in the Camera class, so you need to have an ARCamera to control flash.

If you want to control the Flash without camera, then you probably don't need Vuforia, but just look for Unity API to do that.

 

Topic locked