I made my own Entity class that extends a scene2d Actor to get the advantages of scene2d and Box2D (it has a Body field in it). I use the Box2DLights RayHandler to... well, add lights.
The Player (subclass of Entity) is added to the stage with stage.addActor(player).
Everything works fine, except that the player is completely coverd by its own shadow... The big Sprite in the upper right is just drawn manually (not added to the stage) and works:
If I draw the RayHandler before drawing the stage, the player is not affected by the shadow:
If I think about it, it makes sense that the player is covered by its own shadow; after all, there is a Box2D Body at the same position, which makes the shadow appear there.
But there has to be a way to draw the player over its shadow without
it being completely visible in the dark
. My whole game is not playable if you can see things in the dark.
You can look at the source at http://bitbucket.org/dermetfan/somelibgdxtests
. It's all happening in net.dermetfan.someLibgdxTests.screens.TestScreen3.
Any advice will be highly appreciated!