GameMaker Studio 2: Camera Clamp to Room / Follow Object

Поділитися
Вставка
  • Опубліковано 17 жов 2024

КОМЕНТАРІ • 28

  • @SGTIvan921
    @SGTIvan921 9 місяців тому +2

    4:22, 5:44 The camera clamping code; I already knew the explanation (Thanks, Rob!)

  • @bloodmourn6033
    @bloodmourn6033 Рік тому +1

    OH MY GOODNESS, AN ENDLESS 'THANK YOU'! You can't imagine how great this is! I've been working on my project for like half a year and since the very beginning as I added bigger rooms and camera, I had an issue with character violently shaking because of the way camera was attached to obj_player, as you mentioned all beginners usually do. It was one of only issues I couldn't fix and it was oldest! Now thanks to you it has been solved, finally, a such joy! I wish you the best luck and health!

  • @MadJaze
    @MadJaze 2 роки тому +2

    Im creating another kind of game, and with this clamp function and your video the problem that I had with the camera is actually gone, Im feeling this like a miracle xD
    Thank so much !!

  • @DaPointa
    @DaPointa 4 місяці тому

    This helped me SO much in my sonic fan game!

  • @CatmanCinematics
    @CatmanCinematics Рік тому +1

    I used this video but for some reason my player is not being tracked in the center of the screen. Any ideas on how to fix that?

  • @GameMakerRob
    @GameMakerRob  4 роки тому +2

    One thing I didn't cover is how to make the camera clamp based on rooms of different size.
    As long as you have a player object in every room and don't make it persistent, the 4 variables that we use to clamp inside the create event of the player object should work even if you have rooms of different sizes.

    • @hamzaaslam381
      @hamzaaslam381 2 роки тому

      is there any way to make it work with persistent camera , like resetting the value during the room change ?

    • @GameMakerRob
      @GameMakerRob  2 роки тому

      @@hamzaaslam381 Yes, use the room_start event if you want a persistent camera object to do that

    • @hamzaaslam381
      @hamzaaslam381 2 роки тому

      @@GameMakerRob Thankyou soo much

  • @solidshanks2938
    @solidshanks2938 Рік тому

    You derserve so much more attention man, you saved my project!

  • @Blowitch
    @Blowitch Рік тому +2

    i'm surprised this didn't get more views, because this literally fixed my issue with backgrounds lagging behind the camera

  • @thebigmeat4173
    @thebigmeat4173 Рік тому +2

    broooo i tried so hard to figure this out on my own but couldn’t cuz im a newbie at coding. thank you! 🙏🙏

  • @gabrielpms11
    @gabrielpms11 Рік тому

    how did you do to the camera go out of the room? i'm tring to do this for an infinit map game, but i cant do it

    • @GameMakerRob
      @GameMakerRob  Рік тому

      i dont understand the question sorry. Can you rephrase it?

    • @gabrielpms11
      @gabrielpms11 Рік тому

      @@GameMakerRob I find out how to do what I was trying (I was trying to go out of the room if the camera, to ignore the room size like you did) thanks for answering

  • @eternalwarfare514
    @eternalwarfare514 4 роки тому +1

    YES, IT HAS APPEARED. THANCC.

    • @eternalwarfare514
      @eternalwarfare514 4 роки тому +1

      Nvm, it's not centered vertically on the character yet. EDIT: NEVERMIND THEN IT IS NOW. Thanks Rob.

  • @sylorrin7298
    @sylorrin7298 4 роки тому +1

    another good and helpful video, thx, rob

  • @josekarnikowski1711
    @josekarnikowski1711 3 роки тому +1

    Nice!

  • @1lipefellipe266
    @1lipefellipe266 4 роки тому

    can you teach me how to make a pokemon battle system?

  • @gmdrandom6287
    @gmdrandom6287 3 роки тому

    why does the screen have a black border?

    • @GameMakerRob
      @GameMakerRob  3 роки тому

      It shouldn't unless you're displaying in full screen and the game aspect ratio doesn't match your monitor

  • @jamiefox
    @jamiefox 9 місяців тому

    outdated