Sorry I cannot post all my code here as its too long but essentially I have a MeshBasicMaterial added to the scene, with transparent = true
.
If I try to change the Mesh’s other values such as depthTest = false
instead of true, or change whether it is double sided or not, I can dynamically do this with my simple button. However, in that same button, if I try to change the opacity of the mesh dynamically, it does not work.
I have tried to change the opacity in multiple ways such as:
videoMesh.material.opacity = 0.5;
TweenMax.to(videoMesh.material.opacity, 2, { opacity: 0.5 });
TweenLite.to(videoMesh.material.opacity, 2, { opacity: 0.5 });
However, none of these dynamically change the opacity when the button is pressed. Any tips on why this isn’t working and is opacity a special case?