简体   繁体   English

ARKit - ARCore 多人定位问题

[英]ARKit - ARCore multiplayer positioning issue

I'm trying to make a simple ARKit / ARCore multiplayer app in Unity, using Photon according to this tutorial .我正在尝试根据本教程使用Photon在 Unity 中制作一个简单的ARKit / ARCore多人游戏应用程序。

It works fine in general, but there is one strange problem.它一般工作正常,但有一个奇怪的问题。

I use two smartphones - iPhone and Android devices.我使用两部智能手机 - iPhone 和 Android 设备。 When I place my 3D scene in the real world space for the first time using one of my smartphones (doesn't matter which) and then launch multiplayer everything is fine.当我第一次使用我的智能手机(无关紧要)将我的 3D 场景放置在现实世界空间中,然后启动多人游戏时,一切都很好。

When I position my 3D scene using the second smartphone it's also fine.当我使用第二部智能手机定位我的 3D 场景时,它也很好。 But when I launch multiplayer on the second smartphone the whole scene jumps to a different location on this smartphone.但是当我在第二部智能手机上启动多人游戏时,整个场景会跳转到这部智能手机上的不同位置。

I tried to understand why is it happening, I think when the second smartphone joins multiplayer, it receives information about the position of the 3D scene from the first smartphone, and some differences in coordinate systems cause this error.我试图理解为什么会发生这种情况,我认为当第二部智能手机加入多人游戏时,它会从第一部智能手机接收有关 3D 场景位置的信息,并且坐标系的一些差异会导致此错误。

How can I fix it?我该如何解决?

I suppose, the best way to organize a robust multiuser AR experience is to follow the Apple's main principles of World Map Sharing: Creating a Multiuser AR Experience .我想,组织强大的多用户 AR 体验的最佳方法是遵循 Apple 的世界地图共享的主要原则: 创建多用户 AR 体验 Pay particular attention if Unity supports the latest World Map and Multiuser features for both: iOS and Android.请特别注意 Unity 是否支持 iOS 和 Android 的最新世界地图和多用户功能。

It's also good to use positioning markers to help Operating Systems to locate a user in World Map.使用定位标记来帮助操作系统在世界地图中定位用户也很好。

But remember, the sensors of iOS devices and Android devices are calibrated slightly differently!但请记住,iOS 设备和 Android 设备的传感器校准略有不同!

To find out more useful information about AR and sensors calibration, read my answer in SO post: Are there any limitations in Vuforia compared to ARCore and ARKit?要了解有关 AR 和传感器校准的更多有用信息,请阅读我在 SO 帖子中的回答: 与 ARCore 和 ARKit 相比,Vuforia 是否有任何限制? . .

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM