I'm trying to colorize a spriteNode (in this case its named background) using sprite kit but cant get the color to change. I have a sprite that I want to colorize. I'm changing the color property of the sprite as well as the color blending factor. When I run the app nothing happens though. the color remains the same (its black right now). below is the code I'm using to change the color:
background.anchorPoint = CGPointMake(0, .5);
background.position = position;
// ...
// this does not seems to be doing anything at all
background.color = [SKColor redColor];
background.colorBlendFactor = 1.0f;
did I miss something? I read through the docs and it seems like a pretty simple process. I believe all I need were those 2 lines, but it doesnt have any effect. Does anyone know why this would not be working? The texture image has a lot of transparency, could that be causing the issue? Ive tried this on different sprites and it never works.
See Question&Answers more detail:os