C
Cakelets
Guest
In my game, I want my camera to follow around the player character. It successfully follows the character, but I'm having issues having the aspect ratio stay correct now that I've made it into full screen. My code is included below. Also, after attempting to fix the values, my window is now chopped off at the top and stuck
in the center of my screen. I reverted my changes, and it's still doing that.
I'm not sure what I'm doing wrong, and I'd appreciate help.
Code:
/// create camera
cam = view_camera[0];
follow = oplayer;
view_w_half = camera_get_view_width(cam) * 0.5;
view_h_half = camera_get_view_height (cam) * 0.5;
xTo = xstart;
yTo = ystart;
//fullscreen
windowHeight = 1920;
windowWidth = 1080;
window_set_size(windowWidth, windowHeight);
//monitor
monitorWidth = display_get_width();
monitorHeight = display_get_height();
window_set_position(monitorWidth/2 - windowWidth/2 , monitorHeight/2 - windowHeight/2);
I'm not sure what I'm doing wrong, and I'd appreciate help.