libgdx / box2dlights

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

Rendering with FitViewPort Breaks Viewport #85

Closed chelinho139 closed 9 years ago

chelinho139 commented 9 years ago

When ever you use fit viewport the method RayHandler.render() streches the whole viewport breaking the objective.

Some code: cam = new OrthographicCamera(); viewport = new FitViewport(800,600, cam); viewport.apply(); cam.zoom=CAMERA_ZOOM; ....

in render method:

    rayHandler.setCombinedMatrix(cam);
    rayHandler.update();
    rayHandler.render();

I know it has probably something to do with the shader, that ends up streching the whole viewport.

Please we need this fix..

chelinho139 commented 9 years ago

i found a solution in the forums: http://badlogicgames.com/forum/viewtopic.php?f=11&t=18317&p=84769&hilit=box2dlights#p84769