KyleRansford
Member
I have a game where it's camera size is 640x360 and the viewport is 1280x720 and when the game is run in Windowed Mode, it displays fine (no pixel distortion). But, when I set it to full screen, (using a 1080p monitor) the pixels get stretched (even though it shows black bars and I have it set to keep aspect ratio).
How can I fix this so the black bars appear to keep it's aspect ratio? Here's the code I have in the o_camera Object:
How can I fix this so the black bars appear to keep it's aspect ratio? Here's the code I have in the o_camera Object:
GML:
// Create Code
/// @description Camera
target_ = Auto_Scroll;
width_ = camera_get_view_width(view_camera[0]);
height_ = camera_get_view_height(view_camera[0]);
// Begin Step
if instance_exists(target_) {
x = target_.x;
y = target_.y;
}
// End Step
if !instance_exists(target_) exit;
x = lerp(x, target_.x, 0.1);
y = lerp(y, target_.y, 0.1);
x = round_n(x, 1);
y = round_n(y, 1);
x = clamp(x, width_/2, room_width-width_/2);
y = clamp(y, height_/2, room_height-height_/2);
camera_set_view_pos(view_camera[0], x-width_/2, y-height_/2,);