0

我对 Unity 3D 和 C# 有点陌生。另外,我不确定 Kudans 任意跟踪解决方案的详细工作原理。我目前正在使用 Unity Kudan SDK 构建 VR 位置跟踪解决方案,至少我会尝试一下。现在我的计划是:

  1. 每当网格离开屏幕时,我想冻结它的位置并找到新的特征点(“放置无标记对象”按​​钮正在执行此操作:查找新特征点并放置网格)。
  2. 一旦找到新的特征点(应该是几毫秒),它就会解冻网格的位置并使用新的特征点来进一步改变它的位置。

“寻找新特征点”的想法是必要的,因为每当网格和旧特征点离开屏幕时,跟踪就会变得非常不准确。

我已经在 SampleApp.cs 中尝试过:

bool VRSignal;

        public void Start()
        {
            //Get Bools from "KudanTracker"
            GameObject g = GameObject.Find("Kudan Camera");
            KudanTracker bScript = g.GetComponent<KudanTracker>();
            bool VRSignal = bScript.ArbiTrackIsTracking();  
        }

     public void Update()
        {
            if(VRSignal == false)
            {
                // from the floor placer.
                Vector3 floorPosition;          // The current position in 3D space of the floor
                Quaternion floorOrientation;    // The current orientation of the floor in 3D space, relative to the device

                _kudanTracker.FloorPlaceGetPose(out floorPosition, out floorOrientation);   // Gets the position and orientation of the floor and assigns the referenced Vector3 and Quaternion those values
                _kudanTracker.ArbiTrackStart(floorPosition, floorOrientation);				// Starts markerless tracking based upon the given floor position and orientations
            }
        }

但是现在它不会再正确跟踪了,我也很确定 ArbiTrackIsTracking() 不会成为解决方案,因为当网格离开屏幕时它不会丢失跟踪。

你有解决这个问题的想法吗?

4

1 回答 1

0

如果我理解得很好,您希望在您的 3d 模型从屏幕上消失后立即使用触发器更改 3d 模型的位置。你是对的,即使 3d 模型离开屏幕,ArbiTrackIsTracking() 仍然是正确的,因为如果你再次围绕 3d 模型移动屏幕,3d 模型将始终被跟踪。但是,如果您在逻辑上移动太多智能手机,跟踪就会停止。

我对您的问题的想法是获取您的 3d 模型无标记变换驱动程序的位置,因为 3d 模型在功能上移动您的智能手机的位置和方向以进行跟踪。因此,您可以获取开始跟踪您的 3d 模型的那一刻的位置。然后你给出一个值,该值将对应于保存的第一个和最后一个位置的差异。如果获得了这种差异,则使用 arbitrack stop 停止跟踪。

如果您还有其他问题可以在我的推特帐户@ModeLolito 上提问,我可以更快地回答。您可以观看我的 youtube 频道以查看我在 kudan 上的作品 https://www.youtube.com/user/modelisationLolito

于 2016-08-27T08:59:42.410 回答