GML [SOLVED]Camera View/Follow player around (centered)

E

ejoshuat

Guest
How do I get the camera to follow around the player at its center, and for it to be a small area (zoomed in) so the player has to move and explore to see other areas of the map etc if you know what I mean?
 

jo-thijs

Member
To "zoom in", you just decrease the view size.
In the room editor, under the view tab, you set for "View in room" the values of W and H to something lower.

To make the camera follow the player and keep the player centered, there are 2 main ways to go about it.
1) Let GameMaker do it for you by going to the room editor under the view tab and select which object to follow.
Then set Hbor to half the value of W for "View in room" and set Vbor to half the value of H for "View in room".

2) Manually set view_xview and view_yview through code.
 
Top