[libgdx]need to make Flashlight...

Hi, i’m actually with a new project, in this project i will have a flashlight that changes its size and position. (The mouse will control the flash light, so it has to be dinamic) its a 2d game… I’ve tried to make a image with black background and an alpha, that represents the light of the flashlight, but since it moves and stretches, it gets a lot weird… any tips or sugestions of what i could do to make this flashlight?

thanks.

You could use https://github.com/libgdx/box2dlights.
-ClaasJG

I’ll take a look on this, but for an android game, the performance is good enought?

Well it is based on Box2D physics engine, mid-high end devices will be fine. Really depends on the complexity of your game, in general it will be fine.

The answer to your question is probably yes.

But the only way to find that out is to test it out yourself.

Ty, working on it :smiley: thanks everyone.
There is a way to do it without box2dlights?

Well, other language but you could take a look on the following:

-ClaasJG