How can I scale my tilemap within the camera

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
MaxGamz
Party member
Posts: 104
Joined: Fri Oct 28, 2022 3:09 am

How can I scale my tilemap within the camera

Post 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.
Check.love
(1.22 MiB) Downloaded 41 times
User avatar
dusoft
Party member
Posts: 635
Joined: Fri Nov 08, 2013 12:07 am
Location: Europe usually
Contact:

Re: How can I scale my tilemap within the camera

Post by dusoft »

Without looking at your code I recommend using some camera lib to handle this:
https://github.com/love2d-community/awe ... e2d#camera
wan-may
Prole
Posts: 5
Joined: Thu Sep 14, 2023 5:06 am

Re: How can I scale my tilemap within the camera

Post 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.
dusoft wrote: Mon Sep 18, 2023 11:08 am Without looking at your code I recommend using some camera lib to handle this:
https://github.com/love2d-community/awe ... e2d#camera
Please look at the code, it already uses hump.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 10 guests