Is there anyway to set the alpha transparency of a 3dSprite? So i can display 3DSprites at 50% opacity for example?
There are a few ways.
#1 Use the alpha channel of the image, for example PNG supports per pixel alpha transparancy.
#2 use the SetModulateColor method. The RGBA function lets you specify the alpha value:
sprite->SetModulateColor(RGBA(255,255,255,128));
Would give you 50% transparency for the entire image. As demonstrated in the '3Dsprites.src' example program included with Aurora.
#3 use color keying when you load the texture. As you found out already.
Great thanks, i'll try 'SetModulateColor'.
You can also use SetModulateColor to 'tint' the sprite by the way.
sprite->SetModulateColor(RGBA(255,100,100,128));
Reduces the green and blue channels giving the sprite more of a red hue while showing it at 50% transparency.
Cool!