Page 2 of 2

Re: How to print text that isn't affected by the camera.scale ?

Posted: Sun Jul 21, 2019 2:57 pm
by PGUp
Use love.graphics.push() and love.graphics.pop()

Re: How to print text that isn't affected by the camera.scale ?

Posted: Thu Jul 25, 2019 2:19 pm
by Harrylechienfou
Thanks for the answers but I still don't understand exactly how to do such a thing :/

Re: How to print text that isn't affected by the camera.scale ?

Posted: Thu Jul 25, 2019 8:27 pm
by pgimeno
Harrylechienfou wrote: Tue Jul 09, 2019 5:19 pm I have another question since were're here : what if I want to use the current mouse position to be the center of the screen when I zoom in/out ? Like for example I put the mouse somewhere on the screen when there is a red dot drawn, and because the mouse is wher the red dot is, it will zoom in/out where the mouse is (at the red dot position), but if after that I move my mouse to a blue dot drawn somewhere on the screen, then it will zoom in/out with the camera centered on this blue dot instead.
If I understand correctly, you don't want to actually re-centre the screen (which is what your first sentence suggested) but to do a zoom in/out over an arbitrary point that is not the screen centre.

Take a look at the attached .love file (left click to zoom in, right click to zoom out). If it's what you're after then you'll have to adapt it to your code yourself.

Note: to me, zoom and scale are equivalent, therefore a zoom value of 2 means a 2x zoom. I'm noting it because the camera module that you linked seems to work in terms of inverse zoom, where a value of 2 means a 0.5x zoom.