mcolman Posted July 7, 2016 Share Posted July 7, 2016 Hi, I'm having an issue where the updateCache method is applying worldAlpha. It looks to be a PIXI bug and possibly fixed in later versions, see https://github.com/pixijs/pixi.js/issues/2386 Is anyone having the same issue? Found a workaround?? I'm using Phaser 2.5.0. Example here https://codepen.io/mattcolman/pen/wWqopb Thanks! Link to comment Share on other sites More sharing options...
mcolman Posted July 7, 2016 Author Share Posted July 7, 2016 found a workaround...it's makes my code ugly, but something like this works. ``` parent.removeChild(child) // remove child so the display object's worldAlpha will be 1 child.updateCache() parent.addChild(child) // add the child back ``` Link to comment Share on other sites More sharing options...
drhayes Posted July 7, 2016 Share Posted July 7, 2016 Is the parent a Group? If so, you should probably use "add" instead of "addChild"... but maybe that won't fix this problem? Link to comment Share on other sites More sharing options...
mcolman Posted July 9, 2016 Author Share Posted July 9, 2016 parent is a Group. I wasn't aware of 'add', but looking at the source code it calls 'addChild' internally anyway. It's basically the same thing with some bonus functionality. Link to comment Share on other sites More sharing options...
Recommended Posts