I use this code as my camera in my player class
FP.camera.x = (x - (FP.halfWidth)
FP.camera.y = (y - (FP.halfWidth)
but when I try scalling the screen in the “main” class using FP.screen.scale = 2; I lose the focus on the player
I have looked at this very similar post and tried the solution mentioned, but it just didnt seem to work for me
Hello. I am trying to center the camera on a player and it is not a big deal if the 'FP.screen.scale' equals 1. But when I am trying to "zoom" to 2 and more, the size of a visible region is getting bigger. Even if I set it to 800x600 and so on. How to center the camera on a player and keep the size of the visible area same as without scaling?
Here is an example:
http://moenerli.ru/mylab/flashpunk/Platform/
The size of the window is 1024x768 but it is actually not.
anyway if anyone know what im doing wrong i would greatly apreciate help thx:)