Hello everybody! im trying to make an animation in my project and i wanted to zoom while the animation is Going On.
Moreover, when the process of the animation begins i want the camera to zoom so the user can see it in more details. how can i do it? and do i lose image quality?
and how can i set the camera to zoom at a certain coordinates? Thank you!
Zoom in camera functionality
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Ranguna259
- Party member
- Posts: 911
- Joined: Tue Jun 18, 2013 10:58 pm
- Location: I'm right next to you
Re: Zoom in camera functionality
You can zoom by using [wiki]love.graphics.scale[/wiki](), to make the camera zoom to a specific coordinate you'll need to use the [wiki]love.graphics.translate[/wiki]() function too.
Here's an exemple, use the mouse wheel to zoom to a coordinate and use the mouse buttons to zoom to the center of the screen: EDIT: You already posted this, don't spam the forum.
EDIT2: Check out my post on this if you want to know more.
Here's an exemple, use the mouse wheel to zoom to a coordinate and use the mouse buttons to zoom to the center of the screen: EDIT: You already posted this, don't spam the forum.
EDIT2: Check out my post on this if you want to know more.
- alberto_lara
- Party member
- Posts: 372
- Joined: Wed Oct 30, 2013 8:59 pm
Re: Zoom in camera functionality
Way too late but here's a zoom tool I'm working on (to put it in a game). It uses flux just for smoothness but it's not necessary.
This doesn't use love.graphics functions (like translate and scale) at all, it's canvas-based. It'll work for any image size and any canvas size. For zoom = 1, it'll make the image fit whatever window size you have set, even full screen.
Mouse wheel = change zoom
Ctrl + F = full screen toggle
This doesn't use love.graphics functions (like translate and scale) at all, it's canvas-based. It'll work for any image size and any canvas size. For zoom = 1, it'll make the image fit whatever window size you have set, even full screen.
Mouse wheel = change zoom
Ctrl + F = full screen toggle
Re: Zoom in camera functionality
Wow, that looks really cool! (just the cursor seems to be invisible)alberto_lara wrote: ↑Tue Nov 22, 2022 8:47 pm Way too late but here's a zoom tool I'm working on (to put it in a game). It uses flux just for smoothness but it's not necessary.
This doesn't use love.graphics functions (like translate and scale) at all, it's canvas-based. It'll work for any image size and any canvas size. For zoom = 1, it'll make the image fit whatever window size you have set, even full screen.
Mouse wheel = change zoom
Ctrl + F = full screen toggle
zoom-tool.love
My boat driving game demo: https://dusoft.itch.io/captain-bradley- ... itius-demo
- alberto_lara
- Party member
- Posts: 372
- Joined: Wed Oct 30, 2013 8:59 pm
Re: Zoom in camera functionality
Yup, I'm using but you can remove than and play around, if this is still something you're interested in
Code: Select all
love.mouse.setRelativeMode(true)
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot], Semrush [Bot] and 2 guests