Jump to content

Can't change sprite.tintAlpha


Recommended Posts


This was a limitation in the engine, but should be now changed.

Note that every time you change tint or tintAlpha value, the engine needs to render new tinted texture for the sprite. So if you are doing this a lot, it can get a bit heavy. On that case, i would look for a different approach, like using two separate sprites in top of each other, the top one as a tinted one and then just change it's alpha value.

Link to comment
Share on other sites

Hi @enpu

Awesome, thanks heaps for this. In this case it's a really simple effect and I'm only using it on 4 tiles very sparingly - I really don't think my case will affect performance.

Just for your info, setting the tintAlpha to 0 does not work. I can set it to a very low number (0.000001) but not 0 :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...