简体   繁体   English

在虚幻引擎 4.26 中创建天蓝色的空间锚点

[英]Creating azure spatial anchors in unreal engine 4.26

So I just finished implementing the spatial anchors functions found on the microsoft documentation, but it doesn't show how an anchor is made after placing all of the functions in the blueprint.所以我刚刚完成了微软文档中的空间锚点函数的实现,但它没有显示在蓝图中放置所有函数后锚点是如何制作的。 I was wondering if anyone can help out with this kind of thing.我想知道是否有人可以帮助解决这种事情。 If possible can anyone point me in the right direction cause all I can find were tutorials on using spatial anchors for unity but not unreal engine.如果可能,任何人都可以指出我正确的方向,因为我所能找到的只是关于使用空间锚点实现统一但不是虚幻引擎的教程。 The image shows what some of my blueprints look like for implementing spatial anchoring for the hololens该图像显示了我为全息透镜实施空间锚定的一些蓝图

Adding answer here for reference from Q&A.在此处添加答案以供问答参考。

Check the branch after CreateSession:在 CreateSession 之后检查分支:

在此处输入图片说明

You should connect the return value of CreateSession to the branch, otherwise ConfigSession2 will never be called:您应该将 CreateSession 的返回值连接到分支,否则永远不会调用 ConfigSession2:

在此处输入图片说明

Take a look at our OpenXR HoloLens sample project here: https://github.com/microsoft/Microsoft-OpenXR-Unreal You can see how we set up Azure Spatial Anchors in the StartASA function in the MRPlayerPawn blueprint在此处查看我们的 OpenXR HoloLens 示例项目: https : //github.com/microsoft/Microsoft-OpenXR-Unreal您可以看到我们如何在 MRPlayerPawn 蓝图中的 StartASA 函数中设置 Azure 空间锚点

Some other differences/ things to check:要检查的其他一些差异/事项:

  1. Expand the tab in MakeAzureSpatialAnchorsSessionConfiguration and set the Account Domain from your Azure Portal.展开 MakeAzureSpatialAnchorsSessionConfiguration 中的选项卡,并从 Azure 门户设置帐户域。
  2. Set the Log Verbosity in ConfigSession2 to All to see if any warnings are preventing the setup from continuing.将 ConfigSession2 中的 Log Verbosity 设置为 All 以查看是否有任何警告阻止设置继续。 Also view your output log to see if any errors are being logged.还可以查看您的输出日志以查看是否记录了任何错误。
  3. The False branches should either log a failure or retry after some amount of time: False 分支应该记录失败或在一段时间后重试:

在此处输入图片说明

  1. In Edit > Project Settings > HoloLens > Capabilities, verify you have enabled: "Internet Client Server", "Private Network Client Server", "WifiControl", "Spatial Perception", "Proximity", "Location", and "Bluetooth"在“编辑”>“项目设置”>“HoloLens”>“功能”中,确认您已启用:“Internet 客户端服务器”、“专用网络客户端服务器”、“WifiControl”、“空间感知”、“接近度”、“位置”和“蓝牙”

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

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