Ninjadoodle Posted July 4, 2018 Share Posted July 4, 2018 Hi @enpu When I setup a sprite and give it a 'tint', I can set the 'tintAlpha' with no issues. I however can't seem to be able to change the 'tintAlpha' on a mouse click. Is this a bug / limitation or am I missing a step somewhere? Thanks heaps! Quote Link to comment Share on other sites More sharing options...
enpu Posted July 4, 2018 Share Posted July 4, 2018 @Ninjadoodle 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. Ninjadoodle 1 Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted July 4, 2018 Author Share Posted July 4, 2018 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 Quote Link to comment Share on other sites More sharing options...
enpu Posted July 4, 2018 Share Posted July 4, 2018 Nice! This should be fixed now Ninjadoodle 1 Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted July 4, 2018 Author Share Posted July 4, 2018 Cool Thanks again! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.