MZ Cam Control

FEATURES
This plugin adds a sliding motion to the normal camera motion when the player moves and also allows you to change the camera focus to:
– Player
– Event
– X,Y coordinates
Camera will slide to each target it changes to at speed specified in plugin call.
This plugin also enables Zooming in and out to center of the screen and a ‘wait for camera’ command.

VERSION 1.8 – RPG Maker MZ
Download Plugin file


Download my master demo to view examples of this plugin from:
Galv’s MZ Plugins Home


77 thoughts on “MZ Cam Control

  1. Hans says:

    Good Job!
    Is it possible to add to option to focus on the Event Name instead the ID?

  2. Reid says:

    Man, you’re awesome. Thanks a lot for your work.

  3. Galv says:

    Updated to 1.3 – added the ability to zoom to the center of the screen

  4. anbata17go says:

    HELLO!

    I Use this Plugin, and it’s great helpful.

    but unfortunately, this plugin has a bug.

    this plugin on(ONLY this plugin on, even) -> save -> Load -> Map loading is failed. only event is showing.

    I’m sorry my broken english. (I’m not american)

  5. Galv says:

    Updated to version 1.4 – fixed a bug when loading saved game

  6. Rival says:

    Hello, I tried to use this plugin, but the camera doesn’t center on the character or target event at all. It may be due to my resolution, because I made the resolution bigger.

    I used your mv cam control plugin and it was amazing. It worked with the same resolution size then, but not with mz version.

    • Galv says:

      I have no issues in my project with different resolutions – you might need to check for plugin incompatibility. Also, remember the screen won’t center on the event if it hits the edge of your map.

      • Rival says:

        Ah, yes. Thank you. Unfortunately, there seems to be a compatibility issue with one or multiple of visustella’s/yanfly’s plugins.

  7. Mike says:

    I had the same problem.
    I don’t know if this helps for everyone. But if I set the entry New Game on Boot to false in the settings of VisuMZ CoreEngine at Quality of Life Settings, the error will not occur anymore.

  8. It doesn’t wait for zoom to complete its duration and starts the next event command before that.

    • Galv says:

      Correct – so you can zoom while other event commands are happening. If you want it to wait, use the ‘Wait’ event command after it.

  9. Kevin Kham says:

    I was wondering if you can add an offset. I use this script to make the entire game zoomed in by 2x, but my characters are two tiles high, so the player feels just one tile higher.

    PS love your library of scripts. They’ve helped me progressed so much :)

  10. Great plugin. In my game, I set a high resolution and increased the zoom (200%), however, each map should have +6 cells at the edges, otherwise the character goes off the screen.

  11. compatibility bug with other plugins: ‘(

    but, nice work!

  12. Galv says:

    Updated to 1.7 to include a ‘wait for camera’ plugin command

  13. Xana43 says:

    I’m running into a strange issue with this plugin. for some reason if I use another plugin that skips the title screen, the modified camera doesn’t focus on the player, instead it focuses on what would be the bottom right corner of the screen, and the player is basically off screen at that point. It does still follow the player, but the player no longer is the main focus so to speak. I don’t think it’s an in-compatibility because when I edit the base code to skip the title screen it does the same thing

    • Galv says:

      If it only happens when using another plugin, then it does sound like a compatibility issue.

      • Xana43 says:

        That’s the thing, even when I go into rmmz_scenes and change line 340 from ‘SceneManager.goto(Scene_Title)’ to ‘SceneManager.goto(Scene_Map)’ it does this. I was just wondering if it’s something that can be fixed, mainly because I want to make an animated title screen, and I also want to keep this brilliant plugin because it prevents me have having a weird sense of motion sickness I get with the default camera

      • Galv says:

        Just because you are skipping the title doesn’t mean it’s not a conflict. It sounds like the title plugin changes some default code which makes the cam plugin not work. Have you tried contacting the writer of that plugin?

      • Xana43 says:

        Sorry if i’m not really being clear here, when I originally wrote those comments I was really tired (it was like 5 am where I am)

        I was trying to find a way to make an animated title screen in RPG maker MZ, but all the tutorials that I found pointed to skipping the title screen entirely and using a map with a ton of events as the title screen.

        One of the tutorials I found provided 2 options for skipping the title screen, either I manually go into rmmz_scenes.js and change the code there or use a plugin (in this case MZPlusQuickstart) to skip the title screen. I did more testing with and without the plugin and just with the manual code edit and it does the same thing.

        I even checked the code of the plug in, and all it’s doing is editing the exact same line in rmmz_scenes.js, apart from changing it so that rpgmaker loads the map first and not the title screen nothing else has been changed at all. if you want I can provide some screen shots of what i’m talking about, i’m not really good at explaining myself, so forgive me if it’s still a bit hard to follow

      • Galv says:

        Okay, so… if you just skip the title screen, are you skipping setting up new game data?
        Try putting this before you go to the map scene:
        DataManager.setupNewGame();

        Haven’t tested it, but skipping the title screen means a lot of data isn’t created.

    • Loki Ng says:

      The reason is this plugin relies on Graphics.width to calculate the cam position. But that variable hasn’t been loaded from the database properly. The fix is simple, just make sure the function resizeScreen is called before loading the scene. Below is my code for skipping the title screen.

      (function() {
      Scene_Boot.prototype.startNormalGame = function() {
      this.resizeScreen();
      this.checkPlayerLocation();
      DataManager.setupNewGame();
      SceneManager.goto(Scene_Map);
      this.updateDocumentTitle();
      };
      })();

  14. Xana43 says:

    Well, when I skip the title screen using the Manual code edit, no I am not setting up a new game

    However I’m looking at the code for the MzPlusQuickStart plugin

    it has the

    this.checkPlayerLocation();
    DataManager.setupNewGame();

    but the camera is still offset from the player

    • Xana43 says:

      Worst case scenario I just give up on the animated title for now

    • Galv says:

      Do you have a player in your party? The cam control plugin needs a player to target.

      Other than that – I’d ask in the forum as someone might have more time to look into what is happening for you.

  15. Sham Stalin says:

    Hello there, this plugin works great for smooth camera slides, however when I put in PrimeParallax Plugin(Anisoft), the camera no longer work properly, is there a way how to fix this? it’s not focusing to the player :(

    • Galv says:

      Have you tried asking PrimeParallax author?

      • sham stalin says:

        No I haven’t … was about to hear from you first, but ya I’ll let the author know as well ~ Your camera plugin byfar is the best I could find… to give that 5% extra value/feel to the game ~

      • Galv says:

        Yeah, I tend to not have time to do compatibility fixes for other author’s plugins. I’m not sure what a parallax plugin would affect the camera so I would ask them.

  16. atorres2112 says:

    Hi, I’m impressed by your plugins, thank you very much for then. (Cam & Layer user right now). Well, here is the problem with the Zoom: If I place a zoom such as 1.5 or 2, and try to move by clicking to a position (or touching, as in a tablet) the player goes to the wrong position. It seems like the screen movement affects the click position, as far I click, the greater is the error.
    I think most people use the keyboard to move, but my idea was to zoom the game to play on mobile, and this is an issue.
    This problem also happens in your demo, so it should be easy to test.

  17. Igor Zanetti says:

    Any way to zoom in without getting the blur effect on the sprites?

  18. Alessandro Anelli says:

    Hey Gav, any way to add the function from your old mv plugin “ScreenZoom”, Galv.ZOOM.move(x,y,scale,duration);, for zoom on a defined target and not only the center of the screen?

    I don’t understand why you deleted this function.

  19. JTL says:

    When starting game I get “TypeError: Cannot read property ‘x’ of undefined.” If I toggle off this plug-in, game starts fine.

  20. limmoh says:

    I really love the sliding camera feature, but is there a way to make pictures slide with it too?

    • Galv says:

      This doesn’t do anything with pictures. If you want images that move with the map, look into layer mapping. I have a Layer Graphics plugin that can add images that can move with map.

  21. Jahn Klenyo says:

    Hi Galv, I have a little problem, when I use Cam Control to focus the player on a parallax map with its Layer Graphics plugin the parallax is shaking when the player walks.

    • Galv says:

      Is that the default parallax in the editor? Sounds like a tiny math difference in positioning.

      • Jahn Klenyo says:

        It’s true, basically I had used a map that I had already done in mv for mz as parallax, so I redid the map by mz and everything worked, the plugin is perfect, sorry.

  22. JTL says:

    Pretty neat plug-in. Works great normally, however there is a visual issue where objects like doors seem to jitter repeatedly as the camera slides if you are using parallax maps. By parallax mapping, I mean saving the map as an image and using a photo editor to edit it, then importing it back as an image and adding events and walkable regions on top. I really like the ability to focus and slide the camera to points of interest, more so than the normal camera slide as the player moves, but the jitter kind of makes it unusable with parallax mapping. Is this fixable, or a pipe-dream?

    • Galv says:

      I didn’t delete your post – this blog is set that I need to approve posts before they are shown due to spam. I apologize for the misunderstanding (I did not approve your other post due to language, however).

      Does the jittering issue happen in the demo?

  23. ruhanimoro says:

    You know how awesome you are! Thanks, Galv. You are the best out there.

  24. kkangto says:

    Hi, I am kkangto developing using your plugin.
    Thankfully, this plugin is very useful.
    However, sometimes an error occurs when loading the game.

    TypeError
    this.camTarget.screenX is not a function

    Do you know how I can solve this?

    • Galv says:

      I can’t tell you how to solve it with just that information, but at a guess – you are loading a game where a character no longer exists. Did you save a game, change events and then load that game?

  25. KUBATAIGA says:

    Hey Galv, sorry I haven’t been on in a while. Thanks for the plugins! It’s saved me a lot of time from doing them myself.

  26. Los que tengan problemas con este plugin, desactiven (si tienen activado) el plugin que salta la introduccion del juego, con eso me ayudo y ya no tuve los problemas de cama que se va a una esquina

  27. Vi says:

    Hello! I’m using the version RPG Maker MZ 1.7.0 and there are some problems with this plugin. Even in your demo. The plugin command “Wait for camera” causes the game to freeze. Will you fix this?

    • Galv says:

      I have tested this and cannot seem to replicate the freeze you mentioned. Did you create a new event in the demo to test or use the one on the Cam Control map already there?

      • Vi says:

        I’m so sorry! I forgot to mention the most important thing… I set the screen resolution to 1280×720. This leads to freezes even in the demo version. Specifically with the command “Wait For Camera”. Can you make this work with any screen resolution? ^^

      • Galv says:

        Ah, sounds like it could be a bug for window size. Not sure when I will be able to investigate it, though, sorry. Hopefully one day soon!

        EDIT: Okay, I updated to 1.8 with a fix that hopefully solved the problem.

  28. Vi says:

    Thank you very much for solving the problem very quickly!!! Everything works, I’m very pleased. Your camera plugin is the best and most convenient ^_^

  29. Z says:

    Hi,
    I’ve been using this plugin for a while for my game but I now the camera snaps itself to a certain position on the screen instead on focusing on the player. I don’t know if this is due to an update to the engine or not, but I’ve tried messing with other plugins to see if there’s a conflict with no avail.

    • Galv says:

      Did it happen after you updated something? Updating the RPG Maker MZ software doesn’t update your project, so you would have had to have updated your project files in that case. If you did something like that, might help error-trap. Else, are you running an event that snaps the camera to coordinates?

      • Z says:

        I did the Update Corescript, that’s what I mean by engine update. I opened an older build that didn’t have the updated scripts and the camera didn’t snap.

      • Galv says:

        I’ve updated my local demo project corescripts to 1.8 now and cannot replicate this issue. Did you change anything else in your project? Maybe screen resolution or something else?

        Do you have the latest version of this plugin?

      • Z says:

        Ok, this is gonna sound dumb. Once I unchecked the “Skip Title Screen” option it stopped doing that snapping thing. That seems to be the cause as I tried to see if loading a save replicated it but it did not.

        Thanks you for your patience on helping me out!

      • Galv says:

        That’s not dumb, you found the issue! Looks like skipping the title screen might mean the plugin doesn’t create required variables it uses for it’s positioning. Unfortunately, looks like you won’t be able to use that functionality with this plugin.

  30. kace says:

    hey Galv, question: is there a way to enable this plugin only on specific maps? it works seamlessly on my big-dimensioned maps but bugs out my smaller rooms within my game. i’m not too sure how to disable the camera smoothing + zoom when needed.

    • Galv says:

      You can use the diable plugin command to make the camera work normally. Alternatively, if it’s bugging out on small rooms, it might be because the room is smaller than your window size.

  31. Stoshx says:

    Hi I’ve encountered a bug where while the camera is zoomed; the further away from the center of the map I walk, the more off target my mouse position becomes.

    I was wondering why I couldn’t open chests or talk to NPCs sometimes with the mouse button.

    Here’s a video demonstrating with a mouse targeted spell cast indicator: https://streamable.com/a1chqx

    If there’s any way to fix this please let me know.

    • Galv says:

      I’ve tested and you are correct – seems the default zoom functionality of MZ wasn’t designed to be permanent while moving the player. Unfortunately, I don’t know when/if I will have time to look into that issue.

Leave a comment