C
Creat
Guest
Hey, I am making a game with a large map in which I want to move the camera with the arrow keys and zoom in and out with the mouse wheel. I have searched online on how to achieve this and usually, the answer would include the variables view_xview[...], view_wview[...] etc. Even the manual makes it seem like I can just change these variables to move around the view as well as change the height and width, but unfortunately, this does not work at all for me. Just for testing, I have made a very minimal project where I try to get the view to scroll across the level using
in the step event of a special camera-managing object. The room has viewports enabled and the first viewport is set to visible. Yet when I launch the game, the view stands still.
Am I'm missing something about these variables? Because I don't think I've done anything different than the guides I've read.
I have since found a different way of moving the view, that being camera_set_view_pos, and it actually seems to work, but I find it quite annoying to deal with and would much rather just use view_xview etc. to manage my camera. If anyone could tell me what I'm doing wrong, I'd very much appreciate it. If not, I guess I'll have to learn using the more complex method.
Code:
view_xview[0] +=5
Am I'm missing something about these variables? Because I don't think I've done anything different than the guides I've read.
I have since found a different way of moving the view, that being camera_set_view_pos, and it actually seems to work, but I find it quite annoying to deal with and would much rather just use view_xview etc. to manage my camera. If anyone could tell me what I'm doing wrong, I'd very much appreciate it. If not, I guess I'll have to learn using the more complex method.