Quantcast
Channel: Question and Answer » libgdx
Viewing all articles
Browse latest Browse all 434

Lighting shadow casting sprites with box2Dlights

$
0
0

I currently have something like this using box2Dlights
Player point light with hard shadows

Ideally, I would like objects casting shadows to be lit, so the object is lit but there is still a shadow cast around it. Right now the object is covered by shadow. I am aware of the soft and softnesslength settings in box2dlights but this is not really what I’m looking for. Softness seems to light up a certain radius from the player rather than just lighting objects. It ends up kind of weird looking:
Player point light with softness length = 1.5f
So for example in the above picture, I would want the entire grey box to be lit, and none of the area to the left/right/behind it to be lit.

Any thoughts would be appreciated. Thanks


Viewing all articles
Browse latest Browse all 434

Trending Articles