Quantcast
Channel: cocos2d-x - Cocos Forums
Viewing all articles
Browse latest Browse all 2748

setOpacity for sprites with alpha

$
0
0

@owlet wrote:

Hi there...I have a problem with setting opacity for sprite.
I have two sprites (png):

Second has transparent center. If I add them one above another, as a result I would get this:

Now I want to set opacity to such construction:

Now each layer have its own opacity and result is not what I want. I want this:

How I can achieve this?

I've tried add this sprite as childs for Node and override opacity for Node, tried to play with updateCascadeOpacity methods...nothing works. Can anybody suggest simple solution for such simple problem? (stencil buffer is not an option as well as renderTexture).

Thanks in advance,

Posts: 6

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 2748

Latest Images

Trending Articles



Latest Images