我是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()不会成为解决方案,因为它不会在网格离开屏幕时失去跟踪。
你有什么想法解决这个问题吗?
答案 0 :(得分:0)
如果我理解得很清楚,一旦你的3D模型消失在屏幕上,你就想用触发器改变3d模型的位置。 你是对的,即使3D模型走出屏幕,ArbiTrackIsTracking()仍然是正确的,因为如果再次移动屏幕三维模型,将始终跟踪3d模型。 但如果您在逻辑上移动太多智能手机,则跟踪会停止。
我对你的问题的想法是获得你的3D模型无标记变换驱动程序的位置,因为3d模型在功能上移动智能手机的位置和方向来跟踪。 因此,您可以采取开始跟踪3d模型的位置。 然后给出一个值,该值对应于保存的第一个和最后一个位置的差异。 如果获得此差异,则使用仲裁停止来停止跟踪。
如果您有其他问题,可以在我的推特账号@ModeLolito上询问,我可以更快地回答。 你可以看我的youtube频道看我的作品在九段 https://www.youtube.com/user/modelisationLolito