Andengine fade in/out and alpha modifiers not working

Did you set the blend function properly? Example:

sprite.setBlendFunction(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);

I tried the above but it’s not working for me as it should. The modifier works but instead of a steady fade out the image fades out a number of times for the mentioned duration. Any ideas?

Well ultimately i figured out what i was doing wrong. Here’s it…

        anySprite.setBlendFunction(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);
    IEntityModifier iem = new AlphaModifier(seconds, 0, 255); //for some unknown reason i was passing invalid values and hence it didn't work then :)

Leave a Comment