image opacity

Report problems here (or use the built-in feedback dialog in the editor)
Post Reply
msm1982
Posts: 17
Joined: Tue Aug 20, 2013 4:13 pm

image opacity

Post by msm1982 » Mon Aug 26, 2013 11:43 pm

Hi,

Referring to the cocos2d sample loader, setting the image opacity is achieved by calling

Code: Select all

sprite->setOpacity(img->colorTint[3]);
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?

iforce2d
Site Admin
Posts: 860
Joined: Sat Dec 22, 2012 7:20 pm

Re: image opacity

Post by iforce2d » Tue Aug 27, 2013 4:22 pm

This is a bug in the editor which will be fixed in the next update. Sorry for the bother!
Let me know by email if you need a preview build more urgently, and for which OS.

msm1982
Posts: 17
Joined: Tue Aug 20, 2013 4:13 pm

Re: image opacity

Post by msm1982 » Tue Aug 27, 2013 10:25 pm

Not a big deal, thanks for looking into it.

Post Reply