0
\$\begingroup\$

Is there an easy mechanism to create a color aura around an actor in libGDX?

Thanks for all tips!

\$\endgroup\$
1
\$\begingroup\$

There may be a better/more efficient way to do it, but an easy way would be to draw a tinted, mostly transparent circle on top of an actor. (Or beneath the actor if you don't want the actor itself tinted.)

If you have a white circle texture and want a red aura, then the draw code would look like this

Color oldColor = batch.getColor();
batch.setColor(1,0,0,.2f);
batch.draw(circleTexture,x,y,width,height);
batch.setColor(oldColor);
| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.