首页 > 解决方案 > 3d 模型的背景图像可渲染

问题描述

在我的应用程序中,我需要为添加到场景视图的 3d modelRenderable 对象开发全屏背景图像。

我按照主题中描述的方式做到了:https ://github.com/google-ar/sceneform-android-sdk/issues/332

从 imageView 资源创建 ViewRenderable 对象并将其添加到包含我的 3d modelRenderable 的场景视图中。使用 setLocalPosition(0,0,-2) 作为带有图像的锚节点,因此它显示为 3d 模型的背景,但图像的大小发生了变化,现在不是全屏。我尝试使用带有硬编码值的 setLocalScale/setWorldScale。

这仅解决了特定设备的问题(如果我在不同的设备上运行应用程序 - 图像将不是全屏)。寻找适用于所有设备的解决方案。

标签: androidaugmented-realityarcoreandroid-augmented-reality

解决方案


推荐阅读