camera movement

  1. gibsonfan2332

    GMS 2 Rotating and Moving the Camera View to the Player Object. Jittering/shaking Sprites

    I am attempting to make a top down game with a boat/ship and the camera stays above/behind the players boat. I currently have a camera object that is locked on to the player object so that the player stays in the middle of the view. Basically when I turn the ship, the whole room is turning on...
  2. C

    SOLVED Player look at the top / move the camera

    I am a novice with GameMaker. I search to coding a smooth moving of the camera, to represent the view of the player. When the player press "up" the camera move to top until a limit. When he release "up" the camera comeback to initial position. On the code that I wrote the while condition crash...
  3. JasonTomLee

    Asset - Project (All-in-One) GMS2 Camera with Screenshake, follow, screen-effects, and more

    This thread will serve as documentation for those who've purchased the asset Check out the main page on Itch.io Importing into your project First thing's first. How does everything work? Where do I start? How do I avoid breaking everything? Controls Explaining the code There are...
  4. G

    Camera Object Won't Read Variables (SOLVED)

    (TL;DR version - I'm having trouble with the codes shown in the image. The game acts like the "view_w_half" and "view_h_half" variables don't exist on the step event page, and only uses the data they stand for if I put the data itself into that place)...
  5. T

    Multi Object Camera

    Hey I was looking for a smash brothers style camera where the camera zooms out when players move apart from one another and zoom back in when they get close. I found one and imported it into Studio 2 but I don't know how to make it be constrained to the room size. The new camera system is...
  6. T

    GML How To Make Camera Not Reset It Position Upon Entering Another Room

    Hi there. So, i have problem with my camera movement. I want my camera to not reset it position when i re-entering a room. As you can see it below When i enter the second room and go back to the first room, you can see that my camera reset it position for a second. I want my camera to stay in...
  7. T

    Camera Control Problem

    I have problems with getting my Camera Control working. I think my movement control code interferes with my Camera Control. :) My movement uses W, S, D and A to move around and shift to walk faster. if(keyboard_check(ord("D")) && place_free(x + collisionSpeed, y)) { x +=walkSpeed...
  8. G

    GMS 2 [SOLVED] How to make camera move slowly towards a new target

    Hi. I'm making a cutscene system and I have a script to every action. When the action is done, the script stops executing (I'm not sure if I said that correctly:confused:). But now I need a script that sets a new target to the camera so that the camera starts following the object. But I want it...
  9. C

    Camera and Aspect Ratio Issues When in Full Screen

    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...
  10. C

    [Solved] Problems with changing view positions/dimensions

    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...
  11. TheOnlyWRT

    setting the camera position not working

    Hey guys! So in order to scroll around in my game, i am trying to set the camera position using the following code, but it doesnt seem to be working... here is the code if(keyboard_check(vk_left)){ //viewX -= 5; camera_set_view_pos(0, camera_get_view_x(0)-10...
  12. D

    Camera Control in script

    Ok, simple thing but kinda getting lost. What I'm attempting to do is control the camera based on certain inputs from the player or something in the game and what I'm not sure how to do or what concerns it is that the camera has speed (vertical and horizontal) and if the player touches the the...
  13. R

    GMS 2 Health bar follow player

    Hi team, I want to have the health bar to follow the player when he moves but I can't get it to work. My camera objecta (oCamera) has: Create event: /// @description update camera // You can write your code in this editor //Camera by default cam = view_camera[0]; follow = oPlayer; view_w_half...
  14. R

    GMS 2 Camera not following object only code

    HI team, I am having some trouble making the camera follow my object by code In the room I enabled the view port for camera 0 I created the camera object oCamera and added the create and step event Create event cam = view_camera[0];//Camera by default follow = oPlayer; view_w_half =...
  15. G

    A question I see many make, but no awnser?

    Ok, so. I dont really want a solution to my problem (well if you give me one I'll be glad anyway) I'll like to know were to look to understand why its happening I dont think I can find somenthing about this problem in the manual :( So this is the video I dont know if it is jitter or stutter...
  16. N

    Help with menu following the camera and iphone tips

    Hello, I want to make an iphone game where the menu is infront of you all the time but you can move the camera with the finger like in magikarp jump game. I also read that I need a mac to make iphone games and if it is true can I make the game on windows and then put it on a mac and then just...
  17. Y

    Question - Code Restrict camera movement

    Please give me insight how to achieve this: I have room with width 3000, but i want camera follow only to 2000 (the rest of room reserved for player 2, and separated by wall) I digging into camera manuals and testing different approaches whole day, still no success. <Image Link Removed - Malicious Domain Detected>/nDyj5F
  18. K

    GMS 2 [Solved] Camera snapping to previous location when moving after moving it to other places

    Edit 1: Guess i just needed to post it here to change my perspective on the thing. Since i use x += floor((xTo-x)/5); y += floor((yTo-y)/5); i had to add x = viewposX; y = viewposY; in the initialization of the variables in my Global Right Down method. I have two objects which both have a...
  19. C

    GMS 2 help with: Camera panning with mouse

    Hello! I am using the new camera system in GMS2 and i couldn't figure out how to pan the camera using the mouse. I want the same or similar panning to the GMS2 Workspace, where you hold down mb_middle and move the mouse to pan the view. My camera objects create event code: camera =...
  20. S

    Windows Odd Camera movement

    I am trying to program a top-down 2D game, where the camera is always facing the same way the player is (up). You move with W and S (increcing and decrecing velocity), and rotate with A and D, if I rotate while moving, my obj_player goes further away from the center and starts rotating around...
Top