My first guess to grab and slide the "Alpha" property produced a warning:
Orthello: Alpha value can not be set on this materialReference!
Sprite material properties |
Note to self: Never name anything within the reach of one Levenshtein distance of any popular word if you do not want to loose customers due to Googles suggestions.
Ok, then I'll trial and error my way towards success:
- Unticking the "transparent" checkbox → Ugly black borders where the transparent sprite sections used to be
- Ticking the "Additive" checkbox → Sprite color is added on top of background color
- Changing the "Tint Color" → Another warning
Lessons learned: RTFM (at least page one) even if it's late in the evening!
In short: There are named material references which can be assigned to any sprite. It's also possible to define your own material reference. The one named "alpha" modifies the sprites transparency according to the "Alpha" setting as well as the color tint according to the defined "Tint Color". I left the tint color blank, i.e. used a medium gray, and was now happily able to fade my sprite in and out using the "Alpha" slider.
Creating the script to do the fading was no real problem compared to understanding the property handling:
No comments:
Post a Comment