请选择 进入手机版 | 继续访问电脑版
 找回密码
 立即注册
搜索

本文来自

EasyAR 教程

EasyAR 教程

1 人已关注

EasyAR引擎使用教程,使用案例。

精选帖子

Camera Focus

[复制链接]

1

主题

2

帖子

15

积分

新手上路

Rank: 1

积分
15
21216 rpassareti 发表于 2016-9-15 23:32:57

I started using your augmented plugin, it's really awesome and did what I needed
but I'm having problem on setting the camera focus.
I tried using CameraDevice.FocusMode,  but then, what I should put to set what type of focus I want to be? I tried number, names, but no succes...
It's keeping trying to focus the camera everytime on the project

By the way, I'm using Unity 5.3.5f1 with EasyAR 1.3
(easyAR 1.3.1 gave me some camera problem, the camera was distorted, so I downloaded an older version, and it's worked)

Thx!

(sry for my poor engish writing)
回复

使用道具 举报

lebroncai 发表于 2016-9-26 16:18:50
Hi rpassareti
I create a class using the namespace EasyAR and attach it to the CameraDevice Under AR in Hierarchy.
   QQ图片20160926161133.png

FOCUSMODE.NORMAL - the default focus mode provided by the device
FOCUSMODE.TRIGGERAUTO - setting this focus mode will trigger a single autofocus operation.
FOCUSMODE.CONTINUOUSAUTO - starting in Android 2.3 and iOS devices this focus mode allows to switch-on driver level continuous autofocus for cameras. This is the optimal focus mode for AR apps, since it guarantees that the camera is focused on the target, thus yielding the best tracking results.
FOCUSMODE.INFINITY - sets the camera to "infinity", as provided by the camera driver implementation.
FOCUSMODE.MACRO - sets the camera to "macro" mode, as provided by the camera driver implementation.

Please notice this function used to set focus mode must be called after Awake and Start. It will be a bad idea if you call it every frame.

回复 支持 反对

使用道具 举报

 楼主| rpassareti 发表于 2016-9-26 22:29:14
it works! thx!
i created a coroutine in the end of Start function, to execute the focus after 2 seconds of the app already started
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表