Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
想象一下,我有一个带有太阳镜、帽子、链子等配饰的人类模型。有没有办法通过编写如下内容来切换我的 libGDX 应用程序中这些项目的可见性:
modelInstance.getNode("sunglasses").setVisible(false)
您可以为其材质设置混合属性:
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