SOLVED Cinematic zoom in

FiftyFive

Member
(Sorry for my bad English)Hello i want to make a zoom in cinematic for my game, (i am begginer) so can you suggest where to start?

i tried something like in screenshot but i want to make zoom in and stop.
 

Luke Peña

Member
I don't understand how the screenshot is relevant, but I'll give it a shot! Let's set a standard width and height, we'll call cam_w and cam_h. Then a zoom factor we'll call cam_zoom that is at 1 by default.

When we zoom, we can change the cam_zoom and then use camera_set_view_size to set the camera size to cam_w * cam_zoom and cam_h * cam zoom. This will zoom in and out by the factor of cam_zoom. My guess is that it will scale by the top left corner, so you'll have to offset the position by the difference in size between previous zoom level and current zoom level.

Just as a heads up: Google questions before coming to the forum! Not that it's a bad thing to ask, but it will make you less dependent on waiting for replies and leave attention for other questions. I did a quick search "game maker camera zoom" and found this forum post:

Which outlines basically the exact solution I recommended and this tutorial:

And then there are all the marketplace resources:

Which includes both tutorials and ready-made cameras with zoom features. Honestly, learning to google is a skill that will help immensely! I think being a good programmer is half about being a good Googler.
 
Top