Hello guys.
I’ll keep it short. I think my problem is pretty obvious:
So, there are several problems. The light at the center is too bright and the light is shining through my player.
I tried nearly every config for the handler, but I can’t fix this issue.
Here is some code:
public GameWorld() {
world = new World(new Vector2(0, 0), false);
RayHandler.setGammaCorrection(true);
RayHandler.useDiffuseLight(true);
handler = new RayHandler(world);
// handler.setAmbientLight(0.2f, 0.2f, 0.2f, 1.f); The problem appears with ambient light, too.
handler.setCulling(false);
// handler.setShadows(true);
handler.setBlurNum(1);
public void render() {
Gdx.gl.glClearColor(0, 0, 0, 1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
gw.update(Gdx.graphics.getDeltaTime());
cam.update();
cam.position.set(new Vector2(gw.player.getPosition().x,gw.player.getPosition().y),0);
batch.setProjectionMatrix(cam.combined);
batch.begin();
//Render stuff
batch.end();
debugMatrix.set(cam.combined);
debugMatrix.scale(BOX_WORLD_TO, BOX_WORLD_TO, 0);
debugRenderer.render(gw.world, debugMatrix);
gw.handler.setCombinedMatrix(debugMatrix, cam.position.x / BOX_WORLD_TO, cam.position.y / BOX_WORLD_TO, 800/BOX_WORLD_TO, 480/BOX_WORLD_TO);
gw.handler.updateAndRender();
}
Anyone some ideas, how this problem could be solved?
I’m sorry for my bad english.
Best regards,
SirObvious