在 arcore 中绘制透明的 3d 立方体模型 android

draw transparent 3d cube model in arcore android

我已经在 arcore android 中使用 shapefactor 创建了立方体,但它不是透明的。我怎样才能使模型透明以便放置它显示背景视图。我只找到了以下创建 3d 立方体模型的方法

MaterialFactory.makeTransparentWithColor(this,new Color(248,248,248))
                .thenAccept(
                        material -> {
                          ShapeFactory.makeCube(vector3, Vector3.zero(), material);

                        });

请帮助将立方体设为半透明,以便显示背景视图。

您忘记指定颜色的 alpha 值:

public Color (float r, float g, float b, float a)

new Color(248,248,248, /* alpha value here */)