Closed Aure77 closed 9 years ago
Hi @Aure77,
In the 1.3 you can set the previous 1.2 blending model using following code:
rayHandler.diffuseBlendFunc.set(GL20.GL_DST_COLOR, GL20.GL_SRC_COLOR);
Thanks. But now, how to access to light list from rayhandler (now not public) ? Because I would like to remove light but I only now attached body. Previously I do that :+1:
for (Light light : rayHandler.lightList) {
if(currentBody.equals(light.getBody())) {
light.remove();
break;
}
}
There is a lot of changes but I don't find changelog.
If you do not use the Body/Fixture user data you can workaround it when linking light and body:
...
light.attachToBody(body);
body.setUserData(light);
... // and then:
((Light)currentBody.getUserData()).remove();
Regarding the rayHandler.lightList being private think that's not correct and is a side-effect issue introduced in 1.3 version, I'll check it and fix if needed.
I am actually using box2dlights 1.2 with this settings :
That render this : https://i.imgur.com/rugDUNt.jpg
I have tried to upgrade to 1.3 but I got a strange behavior with same code : https://i.imgur.com/po5rK3c.jpg color is dull and light feel more darker.
Why ?
EDIT: I Saw that : https://github.com/rinold/box2dlights/commit/e8c1010ee78c0e1c971e50cf5e57999565f00d3e#diff-bb6de2497b7e4551aee180796561d089R541 but I cannot modify diffuse blend function from RayHandler (from master). How to make light more flashy ?