Log in or register to post comments

Active the Camera Flash of the divices.

June 4, 2013 - 7:37pm #1

Hello, my question it's simple, I need activate the flash of the mobile devices(SamsungTablet) when the camera find the marker(ImageTarget), and turn off the flash when the marker it's lost. How I can do that?

thanks for the support

Active the Camera Flash of the divices.

June 7, 2013 - 6:04pm #5

Thank you very much, I'll do it.

Active the Camera Flash of the divices.

June 5, 2013 - 5:05pm #4

Yes you'll call CameraDevice.Instance.SetFlashTorchMode(true);

Look for CameraDeviceMenu.cs, which is part of the Unity Extension libraries, for an example of how to toggle the flash interactively. To do so when targets are detected, use an event handler as Alessandro has described.

Active the Camera Flash of the divices.

June 5, 2013 - 4:53pm #3

This class works with the Unity Engine?

 

 

Active the Camera Flash of the divices.

June 4, 2013 - 11:57pm #2

Hi, you can define a class that implements the ITrackableEventHandler interface and register it with the QCARBehaviour.

An example of such interface implementation is given in the ImageTargets sample, see the DefaultTrackableEventHandler.cs script;

the interface provides a method which is called by the engine whenever a trackable is detected or lost; you can put your code in that method, so to activate/deactivate the flash torch when a trackable is found or lost;

the relevant API to use is the setFlashTorchMode( bool ) of the CameraDevice class, see:

https://developer.vuforia.com/resources/api/class_camera_device.htm

 

Log in or register to post comments