我对 Unity 3D 和 C# 有点陌生。另外,我不确定 Kudans 任意跟踪解决方案的详细工作原理。我目前正在使用 Unity Kudan SDK 构建 VR 位置跟踪解决方案,至少我会尝试一下。现在我的计划是:
- 每当网格离开屏幕时,我想冻结它的位置并找到新的特征点(“放置无标记对象”按钮正在执行此操作:查找新特征点并放置网格)。
- 一旦找到新的特征点(应该是几毫秒),它就会解冻网格的位置并使用新的特征点来进一步改变它的位置。
“寻找新特征点”的想法是必要的,因为每当网格和旧特征点离开屏幕时,跟踪就会变得非常不准确。
我已经在 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() 不会成为解决方案,因为当网格离开屏幕时它不会丢失跟踪。
你有解决这个问题的想法吗?