I have a problem with my latest game. Basically I wanted to scale it based on the screen's resolution. The scaling itself works fine, but now I wanted to put the ingame cameras back in. These cameras have the job to track the player's position and zoom while keeping the player at their center.
The problem is, that both systems work perfectly fine on their own. My screen scaler scales the screen correctly and the cameras track the player (keeping him in the center of the screen). But when I try to put them together everything breaks.
You can use the 'w' and 's' keys to zoom the camera in and out and it should keep the small green rectangle at its center. You can use 'e' and 'd' to scale the image and you will notice that the green rectangle doesn't stay in the center of the screen anymore. The scissor breaks too (the red circle should actually be cut off at the corner of the rectangle).
I tried my best to fix it, but it didn't work out.
EDIT: Posted in the wrong section. Already reported it.
[SOLVED] Scaling issues
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Scaling issues
Poked around a bit. I've figured it had something to do with the resolution change.
Line 21 in Camera.lua
Old
New
Line 21 in Camera.lua
Old
Code: Select all
love.graphics.translate(love.graphics.getWidth() / (2 * sx), love.graphics.getHeight() / (2 * sy));
Code: Select all
love.graphics.translate(320 / (2 * sx), 240 / (2 * sy));
Artal, A .PSD loader: https://github.com/EvineDev/Artal
Re: [SOLVED] Scaling issues
Thanks Evine! That solved the issue
Who is online
Users browsing this forum: Ahrefs [Bot] and 190 guests