Hello there, im trying to set opacity of my model to be half transparent, using this lines of code:
im receiving error: “opacity.setParameter is not a function
”
can somebody set me on a right path ?
Hello there, im trying to set opacity of my model to be half transparent, using this lines of code:
im receiving error: “opacity.setParameter is not a function
”
can somebody set me on a right path ?
I forgot to mention that i also used this code:
but wanted sombody to explain from the start
Any ideas? Still havent figured out
Try this:
var meshInstance = meshInstances[i];
var material = meshInstance.material;
material.opacity = 0.5;
material.blendType = pc.BLEND_NORMAL;
material.update();
By default, the materials has no blend type,so they not use the opacity parameter. You need to specify which blend function will be used to render one object above other