Opacity with Blockly not Working

I have been experimenting with the ‘set opacity of ____ to __’ block code. I could see its effects but it does not work properly. When I press play, the code merely adds a shadow in replacement of the object whose opacity should have changed. Through the camera, I am unable to see the object whose opacity was changed. Does anyone know why this happens?

1 Like

Hi Ryan,

Opacity in blockly should be a floating point number between 0 and 1.

So the opacity setting is set as percentage in decimals?

Yes, 50% opacity slider value in inspector corresponds to 0.5 in “set opacity” block and “setOpacity” method of javascript API.