• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Smooth transition camera

J

Jakix

Guest
Hello,

I have a problem. I have a big room of 3840*2160, and a view of 1920*1080 (at the top-left of the room), i want to make a smooth transition to the top-right of the room smoothly, when I click on a button.

All of tutorials do this but with a view that follow the player,i don't follow any object, but just set the value myself in the gml code.

How can I do this ?

Thank you.
 

samspade

Member
Pretty much the same way but you have to make your own custom variable or custom object. camera object is probably the simplest as then you can use the built in camera functions like object following. Just create obj_camera, don't give it a sprite, and set the camera to follow that object. Then when you click the button instead of moving the camera, move the camera object and the view will follow that object.

You can also do this with your own variables but then you need to know enough about the cameras to create your own variable following code.
 
Top