libgdx / box2dlights

Fork of box2dlights by Kalle Hamalainen
Apache License 2.0
257 stars 82 forks source link

possibility to mask light when light intersect with another body #94

Open alwex opened 8 years ago

alwex commented 8 years ago

Hello, I think it would be a great feature to allow light to be masked by other bodies when they intersects, let say for example

lightObjectDef.filter.groupIndex = -1;
...
boxObjectDef.filter.groupIndex = -1;

so that the two object wont collide but will get into each others. The actual result is that the light is not masked at all

image

the idea is to mask the light the following way

image

keeping the light overflow on. It would allow for awesome graphics effects (and I really need it). If anybody has any idea/advices, it would help me a lot.