设备跟踪丢失时无法获取 [英] Can not get when the device tracking is lost

查看:97
本文介绍了设备跟踪丢失时无法获取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我想为我的研究比较一些增强现实SDK.我已经检查了ARCore,并使用ARCore可以检查跟踪丢失的时间.我正在尝试对Vuforia做同样的事情.我有一个带有输入场景的游戏,如下所示:

Hi guys i want to compare some Augmented reality SDKs for my research. I have checked ARCore and with ARCore you can check when the tracking is lost. I am trying to do same with Vuforia. I have a game with an input scene like this:

在其中选择FusionProvideType的位置,并在按下按钮时加载mainscene,在该位置我将所选的下拉选项分配给DeviceTrackerARController.Instance.FusionProvider,然后加载主场景. 主场景如下所示:

where you choose FusionProvideType and when you press the button mainscene is loaded where i assign the selected dropdown option to DeviceTrackerARController.Instance.FusionProvider And then i load main scene. Main scene Looks like this:

在红色中,我处于ARCamera的位置,在橙色中,我的astranaut图像目标的位置为TrackableBehavior.currentstatus. 我已经尝试了所有融合类型,但我不了解的是,当我使用VUFORIA_VISION_ONLYVUFORIA_SENSOR_FUSIONOPTIMIZE_MODEL_TARGETS_AND_SMART_TERRAIN并丢失跟踪时,我可以通过将设备从表面移开而无需返回标记来恢复设备位置.因此,即使标记在视频帧中不可见,设备位置也会恢复并不断更新.但是CurrentStatus保持未定义状态,我希望它是EXTENDED_TRACKED.我的问题是,当我无法使用TrackableBehavior中的CurrentStatusStatusStatusInfo时,如何使用Vuforia通知用户何时丢失跟踪.预先感谢.

In red i have the position of ARCamera and orange has TrackableBehavior.currentstatus of my astranaut image target. I have tried all the fusion types but what i dont understand is when i use VUFORIA_VISION_ONLY, VUFORIA_SENSOR_FUSION and OPTIMIZE_MODEL_TARGETS_AND_SMART_TERRAIN and lost tracking, i can recover device position by moving device away from the surface without going back to marker. So even if marker is not visible in the videoframe the device position gets recovered and keeps getting updated. But CurrentStatus stays undefined which i expect it to be EXTENDED_TRACKED. My question is how can i inform user when the tracking is lost using Vuforia since i can not use CurrentStatus, Status or StatusInfo from TrackableBehavior. Thanks in advance.

推荐答案

放松,在Vuforia上变得非常容易.

Relax, it gets very easy on Vuforia.

在项目"窗口中找到名为DefaultTrackableBehaviour或类似名称的脚本,其中包含OnTrackingFoundOnTrackingLost事件.

Find on the Project window the script named DefaultTrackableBehaviour or something like that, inside there is the OnTrackingFound and OnTrackingLost events.

使用MyScript myScript = GetComponent <MyScript>();获取目标脚本具有要触发和完成的行为.

Use MyScript myScript = GetComponent <MyScript>(); to get the script of your target has with the behaviors you want to trigger and done.

这篇关于设备跟踪丢失时无法获取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆