I'm using Khris' Dynamic Sprite Rotation Module: http://www.adventuregamestudio.co.uk/forums/index.php?topic=33122.msg601519#msg601519
Is there any way to preserve the alpha channel of sprites after rotation? Antialiasing is lost as soon as I do so, and I get black edges.
Thanks
Atelier
All the module does is store the current angle of each rotated sprite. The actual rotation is done by AGS.
Which means if you do:
DynamicSprite* sprite = DynS.CreateFromExistingSprite(slot, true); // preserve alpha channel
and the rotated version still loses the alpha channel, it's AGS's fault.
Hmm ok. It doesn't look pretty but it's nothing major. Cheers!
That's pretty strange, I made this script, and sprite's translucent areas are drawn properly:
function room_AfterFadeIn()
{
DynamicSprite *spr = DynamicSprite.CreateFromExistingSprite(1, true);
spr.Rotate(45);
Overlay *o = Overlay.CreateGraphical(10, 10, spr.Graphic, true);
Wait(100);
}
NOTE: it's interesting, it works right even if I create non-transparent overlay (Overlay.CreateGraphical's last parameter is false)
The game is 32-bit, sprite is imported from png with alpha channel.
Maybe we could compare our actions to find out what did you do different?
Using AGS 3.2.1 btw.