André Luiz
Member
Hi, I'm Brazilian so I apologize for any English mistakes, okay let's start, I was playing with the game maker studio 2 and there came a time when I had to make a camera for my character, but I couldn't, I saw several codes and videos and I got this flawed result:
#region Camera
halfViewwidth = camera_get_view_width(view_camera[0]) / 2;
halfviewHeight = camera_get_view_Height(view_camera[0]) / 2;
camera_set_view_pos(view_camera[0], x - halfViewwidth, y - halfviewHeight);
#endregion
But, this code makes my character not walk, how do I solve it?
Note: I put this code in the "end step" event
#region Camera
halfViewwidth = camera_get_view_width(view_camera[0]) / 2;
halfviewHeight = camera_get_view_Height(view_camera[0]) / 2;
camera_set_view_pos(view_camera[0], x - halfViewwidth, y - halfviewHeight);
#endregion
But, this code makes my character not walk, how do I solve it?
Note: I put this code in the "end step" event