Xalezar
Member
Been trying to make my viewport 0 smaller than the game window, but whatever size I set the viewport to, it becomes stretched to fill the game window, so it ends up being distorted (stretched out vertically). What I've done so far in my mgr_camera persistent object that is instantiated at the start of the game in room rm_init, which has dimensions 160 x 284. Immediately after mgr_camera is instantiated, the player is transported to a new map where he can walk around.
What I've attempted so far:
Any help is appreciated, thanks.
What I've attempted so far:
Code:
/* Create */
camera = camera_create();
/* Room Start */
view_enabled = true;
view_visible[0] = true;
view_xport[0] = 0;
view_yport[0] = 0;
view_wport[0] = 160;
view_hport[0] = 160;
view_camera[0] = camera;
var pm = matrix_build_projection_ortho(view_wport[0], view_hport[0], -9999, 9999);
camera_set_proj_mat(camera, pm);
var vm = matrix_build_lookat(view_wport[0]/2, view_hport[0]/2, -10, view_wport[0]/2, view_hport[0]/2, 0, 0, 1, 0);
camera_set_view_mat(camera, vm);
Last edited: