如何在sceneform中为阴影创建透明面板?

tzxcd3kk  于 2021-07-03  发布在  Java
关注(0)|答案(0)|浏览(295)

我到处找,但没有找到答案。其思想是创建一个节点,其中包含一个只接收阴影的透明面板。我试过了

MaterialFactory.makeTransparentWithColor(context, new Color(255,255,255,0.2f))
.thenAccept(material -> {
            Vector3 size = new Vector3(5f,0.0001f,5f);
            Vector3 center = new Vector3(0f,-0.5f,0f);
            ModelRenderable floorRenderable = ShapeFactory.makeCube(size,center,material);
            floorNode.setRenderable(floorRenderable);
        })

MaterialFactory.makeTransparentWithTexture(context, texture)
        .thenAccept(material -> {
            Vector3 size = new Vector3(5f,0.0001f,5f);
            Vector3 center = new Vector3(0f,-0.5f,0f);
            ModelRenderable floorRenderable = ShapeFactory.makeCube(size,center,material);
            floorNode.setRenderable(floorRenderable);
        })

但我有一个不完全透明的物体。
谢谢

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题