1

サングラス、帽子、チェーンなどのアクセサリーを付けた人間のモデルがあるとします。次のように記述して、libGDX アプリケーション内でこれらの項目の可視性を切り替える方法はありますか。

 modelInstance.getNode("sunglasses").setVisible(false)
4

1 に答える 1

2

マテリアルにブレンディング アトリビュートを設定できます。

blendingAttribute = new BlendingAttribute(GL10.GL_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);
material = modelinstance.materials.get(0);
material.set(blendingAttribute);

次に、次のように不透明度を設定できます。

blendingAttribute.opacity = 0.5F; //0-1
于 2014-01-08T23:08:52.513 に答える