简体   繁体   English

Azure空间锚定Unity中的子对象

[英]Azure spatial anchors child object in Unity

I did a simple experiment after successfully completing the cross platform quick start Microsoft tutorials for HoloLens and iOS. 在成功完成针对HoloLens和iOS的跨平台快速启动Microsoft教程后,我做了一个简单的实验。 I simply added a child capsule to the default cube demo object. 我只是将一个子胶囊添加到默认的立方体演示对象中。 When I created an anchor in the HoloLens app, the capsule was visible floating above the cube during anchor creation and when being recalled. 当我在HoloLens应用程序中创建锚点时,在锚点创建期间和被召回时,可以看到胶囊在立方体上方浮动。 However when I tried to view the anchor in iOS, only the cube was seen (capsule child object was not visible). 但是,当我尝试在iOS中查看锚时,只看到了立方体(胶囊子对象不可见)。 If I created the anchor in the iOS app, only the cube was visible during creation and when being recalled. 如果我在iOS应用程序中创建锚点,则在创建期间和调用时只能看到多维数据集。 However, when the anchor that was created in the iOS app was located by the HoloLens app, the capsule child object WAS visible. 但是,当在iOS应用程序中创建的锚点由HoloLens应用程序定位时,胶囊子对象可见。 So, clearly the iOS app was storing the child object with the anchor it created, it just doesn't display the object. 所以,显然iOS应用程序使用它创建的锚存储子对象,它只是不显示对象。 Any idea why? 知道为什么吗? How would one go about placing a game object interactively and then making that object a spatial anchor itself? 如何以交互方式放置游戏对象然后使该对象成为空间锚? That would probably get around the lack of displaying the child object in the iOS app, as the demo cube object was seen in both the HoloLens and iOS apps. 这可能会解决在iOS应用程序中缺少显示子对象的问题,因为在HoloLens和iOS应用程序中都可以看到demo多维数据集对象。

@Gary, Azure Spatial Anchors is only sharing the world position between the clients not the holograms. @Gary,Azure Spatial Anchors只分享客户端之间的世界位置,而不是全息图。 In you case the cube is in the correct position and because you added the asset cube in HoloLens you see it in HoloLens. 在你的情况下,立方体处于正确的位置,因为你在HoloLens中添加了资产立方体,你可以在HoloLens中看到它。 If you want another Hologram in iOS you will need to create the asset in iOS and have it in the scene. 如果您想在iOS中使用其他全息图,则需要在iOS中创建资源并将其置于场景中。

If you want to have the same holograms across clients you need to do the work in all the clients and attach the world pose that you will receive from Azure Spatial Anchors Service. 如果您希望跨客户端使用相同的全息图,则需要在所有客户端中完成工作并附加您将从Azure Spatial Anchors Service接收的世界姿势。

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

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