smolus
smolus

Reputation: 125

drop shadow in libgdx

i'm working on a 2d android game and i would like to add a shadow/elevation to some of my in game elements.

enter image description here

This image shows exacly what effect do i want to achive. I know it can be easly achived using xml but i'm making my game using libgdx. I've searched quiete alot and i havn't found any built in way to do this. I cant use premade shadow graphics to put behind my elements becouse there are alot of diffrent element sizes. Would realy appriciate some help and hope my english didn't make it too hard to understand :)

Upvotes: 2

Views: 1200

Answers (1)

p.streef
p.streef

Reputation: 3815

You can use a premade shadow graphic. Just use it as a ninepatch image. This is how I achieve exactly this effect.

More info here

Upvotes: 2

Related Questions