image opacity
Posted: Mon Aug 26, 2013 11:43 pm
Hi,
Referring to the cocos2d sample loader, setting the image opacity is achieved by calling
I tested this in my own scene, setting an image (not attached to any bodies) opacity to 0.5
The b2dJsonImage instance I get when loading the world has img->opacity as 0.5 (correct opacity), but colorTint[3] as 255 (fully opaque)
I can work around this, but just wondering if perhaps I am doing something wrong?
Referring to the cocos2d sample loader, setting the image opacity is achieved by calling
Code: Select all
sprite->setOpacity(img->colorTint[3]);
The b2dJsonImage instance I get when loading the world has img->opacity as 0.5 (correct opacity), but colorTint[3] as 255 (fully opaque)
I can work around this, but just wondering if perhaps I am doing something wrong?