简体   繁体   中英

Switch Front Camera ARToolkit Unity

I'm using ARToolkit with Unity to create a AR application for Android and iOS . My main problem is that I can not switch between back camera and the front one. Is there any way accomplish this using C# ?

according to the documentation here: http://artoolkit.org/documentation/doku.php?id=2_Configuration:config_video_capture

section 'AR_VIDEO_DEVICE_IPHONE' you can specify the camera using the parameter: '-position=X'

So as it looks you can do this for your application in the configuration. However you question sounds like you would like to do this dynamically.

A start could be to call the function: PluginFunctions.arwStartRunningB(...)

with the defined configuration including the '-position=X' parameter. Of cause you would need to call 'arwStopRunning' before you can call arwStartRunningB again.

Does that answer your question?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM