CutThroat Neko
Member
I was playing with the Arena shooter demo from GMS2 in order to understand the new camera system and I faced a really weird behavior (imho) with the camera_set_view_angle function.
I just add this line to the obj_camera, to have the camera view rotating as well when it shake.
But then, when the view is rotating, row and column of tiles near the boundaries of the game windows disapear and then reappear randomly.
Is this an expected behavior because I missed something somewhere with the new camera system ?
I just add this line to the obj_camera, to have the camera view rotating as well when it shake.
Code:
//slowly decay any applied shake
shake *= 0.9;
//screenshake
var cam = view_camera[0]
camera_set_view_pos(cam,camera_get_view_x(cam)+random_range(-shake,shake),camera_get_view_y(cam)+random_range(-shake,shake))
//Line below is the one I've added
camera_set_view_angle(cam,camera_get_view_angle(cam)+random_range(-shake,shake))
Is this an expected behavior because I missed something somewhere with the new camera system ?