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.7 – RPG Maker MZ
Download Plugin file


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


Advertisement

61 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.

Leave a Reply to Xana43 Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s