Tyruswoo's Camera Control plugin allows greater control of the camera.
CamSetCamFollow
CamSetsimply places the camera at a certain position, but the camera will still be attempting to follow its current target (usually the player, by default).CamFollowallows changing the camera's target. This can be used to make the camera follow a certain event's perspective. Or, the camera can be set to follow the map (i.e. a fixed perspective).- These plugin commands can be used in combination with the "Scroll Map..." event command, found on Event Commands tab 2, under the Movement section.
In all plugin command calls described below, place x and y with coordinates, and replace ID with an event's ID number.
CamSet x y sets the camera's position to x and y, where x and y are integers.
CamSet player sets the camera's position to the player's current position.
CamSet event ID sets the camera's position to the current location
of the event of the given ID.
CamFollow x y makes the camera follow (lock on) the given coordinates.
- This sets the camera to "follow" the map; i.e., to not move unless the "Scroll Map..." event command is used.
- This is useful is conjunction with the event command "Scroll Map..." (found on Event Commands tab 2, under the Movement section). This allows for cutscenes where the camera is set to follow a certain path, but the player can still move as they please.
- Note that the "Scroll Map..." event command can be used in two directions at once, allowing for diagonal panning of the camera.
CamFollow map makes the camera follow (lock on) the map, at the
camera's current position, without defining coordinates.
CamFollow player makes the camera follow the player.
This is the same as the default behavior of the RPG Maker MV camera.
CamFollow event ID makes the camera follow the position of the given event.
This can be useful in making cutscenes that follow a certain event.
If the event is invisible, then it can look like the camera is simply panning across a scene.
- This can also be used to allow for cutscenes where the camera is set to follow a certain path, while the player can move as they please.
- Can also be used in combination with the "Scroll Map..." event command, allowing for diagonal panning of the camera.
Camera Control comes with functions that can be called inside scripts. These functions correspond to the plugin commands described above.
Replace x and y with coordinates, and replace id with an event's ID number. The scripting functions are written as shown below:
// Camera setting functions
Tyruswoo.CameraControl.setOnCoords(x, y);
Tyruswoo.CameraControl.setOnPlayer();
Tyruswoo.CameraControl.setOnEvent(id);
// Camera following functions
Tyruswoo.CameraControl.followCoords(x, y);
Tyruswoo.CameraControl.followMap();
Tyruswoo.CameraControl.followPlayer();
Tyruswoo.CameraControl.followEvent(id);To see output from Camera Control (and any other plugins that might log to the console), press the F12 key while in game to open the console. When you run a Camera Control plugin command or script function, the action it takes will be logged to the console.
For example, if the plugin command CamFollow player runs, and the player
is at the coordinates (44, 12), the console logs the following:
CamFollow: Camera now following player's position: x = 44 , y = 12
The log message will tell whether the command's point of reference is the player, an event, the map, or coordinates.
Now suppose the plugin command CamSet Foo runs. This is not expected usage
so the console shows the following warning:
Ignoring unrecognized CamSet command: CamSet Foo
So if Camera Control ever isn't behaving as you expect, you can check the console for clues to what happened.
Visit Tyruswoo.com to ask for help, donate, or browse more of our plugins.
v1.0
- Plugin released.
v1.1 - 2/1/2020
- Fixed a bug that resulted in an event's speed increasing when targeted by the CamFollow Event plugin command.
v1.1.1 - 9/2/2023
- This plugin is now free and open source under the MIT license.
v1.1.2 - 2/21/2024
- Fixed a compatibility issue with other plugins that alter Game_Player's update function.
v1.2.0 - 4/9/2026
- Improved tolerance for spelling and syntax variations.
- Added static functions for use in scripting.