如何在保持 LiDAR 调试网格的同时禁用相机馈送?

Ale*_*one 4 augmented-reality swift arkit realitykit

我在启用 LiDAR 的设备上运行 iOS14 ARSession,并让它输出通过相机源动态创建的网格覆盖层。

是否可以禁用 ARView 或 ARSession 的相机源,同时仍然看到调试网格覆盖?

这是我显示网格覆盖的方式:

arView.debugOptions.insert(.showSceneUnderstanding)
Run Code Online (Sandbox Code Playgroud)

我想看到的是:黑屏,带有代表网格顶点和面的彩色线条。

ARG*_*Geo 5

是的,可以禁用相机源,同时仅保留 LiDAR 调试网格:

@IBOutlet var arView: ARView!

arView.environment.background = .color(.black)
Run Code Online (Sandbox Code Playgroud)

...如果您需要获取相机反馈,只需使用:

arView.environment.background = .cameraFeed()
Run Code Online (Sandbox Code Playgroud)