Page 1 of 1
How can I scale my tilemap within the camera
Posted: Mon Sep 18, 2023 12:35 am
by MaxGamz
My goal is to scale the camera in general so the viewing angle will be smaller. It is centered on the player but the camera is too far away. Someone suggested a zoon parameter but it only increases the size of the player and all other aspects aren't affected. Pushing and Popping doesn't work either.
Re: How can I scale my tilemap within the camera
Posted: Mon Sep 18, 2023 11:08 am
by dusoft
Without looking at your code I recommend using some camera lib to handle this:
https://github.com/love2d-community/awe ... e2d#camera
Re: How can I scale my tilemap within the camera
Posted: Tue Sep 19, 2023 3:53 am
by wan-may
You're passing the zoom parameter to currAnim:draw - but this function only draws the player.
Instead, try passing it to the camera. Use cam:zoom( 2 ) or cam:zoomTo( 2 ) to make everything twice as zoomed.
Please look at the code, it already uses hump.