1

我正在尝试在一个项目中使用 Kudan AR,我有几个问题:

1)标记大小与场景的关系对我来说似乎很奇怪。例如,我使用 150x150 像素的图像作为标记,当我在场景中使用它时,它占据了 150 个单位!它要求我的所有对象都非常巨大,有时甚至比相机远平面延伸得更远,这会破坏增强。它是正确的,还是我错过了什么?

2)我正在尝试使用标记来定义增强的起始位置,然后切换到无标记跟踪以获得更广泛的体验。他们有一个使用本机 iOS 库 ( https://wiki.kudan.eu/Marker_to_Markerless ) 的示例代码,但没有关于如何在 Unity 中执行此操作的参考。这就是我正在尝试的:

markerlessDriver.localScale = new Vector3(markerDriver.localScale.x, markerDriver.localScale.x, markerDriver.localScale.z);
markerlessDriver.localPosition = markerDriver.localPosition;
markerlessDriver.localRotation = markerDriver.localRotation;

target.SetParent(markerlessDriver);
tracker.ChangeTrackingMethod(markerlessTracking);

// 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

tracker.FloorPlaceGetPose(out floorPosition, out floorOrientation); 
tracker.ArbiTrackStart(floorPosition, floorOrientation);

它会切换,但模型的位置/旋转会消失。关于如何做到这一点的任何想法?

提前致谢!

4

0 回答 0