Closed ghost closed 9 years ago
Hi @postpunkpl,
It's not possible for v1.2, you should use the 1.3 - and the best way is to use the camera itself for setting combined matrix:
rayHandler.setCombinedMatrix(camera)
Also for the correct viewport rendering if not using default values you should set it manually (in resize method):
rayHandler.useCustomViewport(x, y, width, height);
Where the x, y, width and height are the values of your custom viewport.
Hi Mikhail!
Thank You very much! It works perfectly! :)
Greetings
Peter
You are welcome!
I will hold this issue open for a while, until the info on the Wiki will be created regarding the box2dlights custom viewport usage - it seems be quite useful, but missing currently.
Hello Mikhail,
I'm sorry to bother you, but i have again problem with FitViewports. Could you be so nice and look at this post?:
http://www.badlogicgames.com/forum/viewtopic.php?f=11&t=18362&p=77183#p77183
Greetings
Peter
2015-02-09 16:44 GMT+01:00 Mikhail Churbanov notifications@github.com:
You are welcome!
I will hold this issue open for a while, until the info on the Wiki will be created regarding the box2dlights custom viewport usage - it seems be quite useful, but missing currently.
— Reply to this email directly or view it on GitHub https://github.com/libgdx/box2dlights/issues/41#issuecomment-73530464.
Added Wiki page
Hello,
I have a problem with rendering my game with box2dlights and FitViewport option.
My project use gdxVersion = 1.5.3 and box2dlights:1.2 or 1.3.
I use macbook pro with Eclipse and test my game for Desktop.
I have a ortho camera and FitViewport:
my renderer create method:
my renderer render method:
my resize() method:
after changing window size without using box2dlights my screen looks like this:
http://i59.tinypic.com/w12wb5.png
after changing windows size with box2dlights my screen looks like this:
http://i59.tinypic.com/2qmof3r.png
So it's looks like adding box2dlights disable correct work of FitViewport or i have a bug in my code.
I have no idea what is wrong with my code :(