我正在使用iOS构建一个RealityKit应用程序。我想在ARView中阅读QR代码,但是找不到任何关于它的文档/教程。
RealityKit:https://developer.apple.com/documentation/realitykitArView:https://developer.apple.com/documentation/realitykit/arview任何关于这样做的建议/指导都将不胜感激!提前谢谢。
发布于 2020-07-24 04:51:02
在RealityKit中,您可以使用图像识别技术识别、QR代码或全新的AppClipCode。为此,在Assets.xcassets中创建Assets.xcassets目录,并将JPEG或PNG图像与QR代码放在那里。每个项目最多可以使用100幅图像。然后对锚实体使用.image init。
let anchor = AnchorEntity(.image(group: "AR Resources", name: "qrCodeImage"))
anchor.addChild(modelEntity)
arView.scene.anchors.append(anchor)由于ARKit和RealityKit具有类似的功能,请阅读this post以获得更多信息。
但是,您不能只使用框架读取任何QR代码(我的意思是提取QR中包含的信息)。
https://stackoverflow.com/questions/63059789
复制相似问题