camera

  1. Christopher Risdon

    GMS 2 Multiple Active Cameras.

    I need help to set up displaying 2 camera views at the same time. The helpfile says you can do it but the second camera overwrites the first when I tried to do it. Camera A I need to be full screen. Camera B as an overlay with adjustable size. Both toggle-able to be displaying at the same time...
  2. J

    Making the healthbar stick to my cameraview? [SOLVED]

    This is a pretty simple one, i simply want my healthbar to stick to the upper-left corner of my camera view, this is my code for the healthbar: STEP EVENT: x=camera_get_view_x(view_camera[0]); y=camera_get_view_y(view_camera[0]); What happens is that it simply places it in the corner once when...
  3. B

    Rotating camera with player

    Hi, Fairly new to GM and coding and I am trying to rotate the camera based on which direction the player is facing, but I must be thinking about this the wrong way and it might be a stupid question. To do this I am trying to define the up vector for the camera based on the players image_angle...
  4. C

    Circular viewport (or camera) in GMS 2

    Hi I would like to make a circular secondary viewport for a minimap. How to go about that? It is easy enough for me to create a rectangular one (with zooming and scrolling and all that) using the built in viewports, but a circular one...?? I dont know where to begin: can it be done using the...
  5. L

    Player is little blurry when view moves horizontal

    Hi guys. I have a problem where my player is moving horizontal view works strange and player gets a little blurry. But if I set spd = 1 it goes normal, but too fast for me. I need floor number of speed but view ruins it. obj_player [CREATE EVENT] frame_delta = 60 / 1000000 * delta_time; spd =...
  6. Consuming Octorocks

    GMS 2 Help with smooth camera zoom perhaps?

    So I'm not every good with math (at all) and im trying to get a gentle zoom with my camera system. Basically its a 2D platformer and whenever I go into a large room (like a boss fight or something of that nature) I need the camera to zoom out. I already have a pretty good camera system set up...
  7. 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...
  8. trentallain

    GMS 2 [solved] Aiming (camera)

    In my game I want it so if I am holding right click on a mouse or L2 (gp_shoulderlb) on a controller, it will slowly move the camera towards a point (which will be the camera's view width or height/2 past the camera's target object, with an angle up to 360 degrees). And if I release right click...
  9. 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...
  10. S

    GMS 2 Drawing Inventory to Camera

    I'm trying to center an inventory sprite onto the camera position, so that the inventory stays on the gui. I don't want to draw the inventory to the gui; I want to draw the inventory to coordinates that are determined every step of the game. Here is my inventory's create event...
  11. 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 =...
  12. S

    GMS 2 Camera Not Activating

    I have the following code in the creation code of my room: camera = camera_create_view(0, 0, 640, 480, 0, obj_player, 5, 5, -1, -1); var viewmat = matrix_build_lookat(640, 240, -10, 640, 240, 0, 0, 1, 0); var projmat = matrix_build_projection_ortho(640, 480, 1.0, 32000.0)...
  13. EricPB

    GMS 2 Camera and Physics Conflict?

    Here is a problem, I am trying to make a physics based game for GMS2. As such I enabled physics for the one test room I have and the appropriate objects, and try to set up the camera. The problem comes that when I have the rooms boxed ticked off as using physics, the camera doesnt display the...
  14. J

    How do I confine my camera's view to be only within the room.

    Haven't quite figured this out yet. Here's my code: In the Creation Event of object oCamera: // Initialize Viewports view_enabled = true; view_visible[0] = true; view_xport[0] = 0; view_yport[0] = 0; view_wport[0] = 320; view_hport[0] = 180; view_camera[0] = camera_create_view(0, 0...
  15. J

    GMS 2 GML Camera move

    hey! when i use: camera_set_view_pos(view_camera[0], 110, 510); to move around the room, it works fine. but then i make my own camera: camera = camera_create(); var pm = matrix_build_projection_ortho(1920, 1080, 1, 5000); var vm = matrix_build_lookat(960, 540, -10, 960, 540...
  16. D

    GMS 2 Make camera area bigger without pixelization

    Hello! I currently have a room set up where I've enabled viewports, set the viewport to visible, and set the camera/viewport size to the default 1024x768. Sprites in the game are all 64x64. My question is this: I'd like to make the camera area larger, so that more of the room shows around...
  17. A

    GMS 2 Code doesn't work

    Hello. I'm trying to make an instance move with the mouse, but I want the camera to move with it, too. I tried simply testing for mouse_x changes, but when it moved the camera, the mouse_x changed, and it moved the camera, ... So I made it that the mouse gets put into the middle, you move it...
  18. S

    GMS 2 Map is Limiting to a Small Size

    I'm having an issue with my game. I can create a map as large as I want, which is fine, but my camera is only following my player until about 14k pixels down. After that, it stops following the player and stays at around that mark. Is this a bug, is this my system limits, or is this GMS2's limits?
  19. B

    GMS 2 Rotating camera

    Hi, I am new to GM and am currently trying to figure out how to rotate the camera using the new camera system. Basically what I am trying to do is have the camera rotate based on a direction from the player object to another object. In other words the camera should be following the player in...
  20. B

    Question - Code Rotating camera

    Hi, I am new to GM and am currently trying to figure out how to rotate the camera using the new camera system. Basically what I am trying to do is having the camera to rotate based on the player angle/rotation. Using the "old" views I guess I would do this by setting the view_angle to be the...
Top