Description
Changelog
Reviews (3)

Exported properties:

  • zoom_factor (multiplies Camera2D.zoom each mouse wheel scroll)
  • zoom_min (minimum Camera2D.zoom)
  • zoom_max (maximum Camera2D.zoom)
  • zoom_limited (if true, MapCamera2D.zoom_min is effectively increased to stay within limits)
  • zoom_relative (if true, mouse zooming is done relative to the cursor)
  • zoom_keyboard (if true, zooming can also be done with the plus and minus keys)
  • pan_speed (adds to Camera2D.offset while the cursor is near the viewport's edges)
  • pan_margin (maximum number of pixels away from the viewport's edges for the cursor to be considered near)
  • pan_keyboard (if true, panning can also be done with the arrow keys)
  • drag (if true, the map can be dragged while holding the left mouse button)
  • drag_inertia (multiplies the final drag movement each second)

Video: https://www.reddit.com/r/godot/comments/wjc2c2/i_made_a_mapcamera2d_script_for_smooth_scrolling/

Changelog for version v1.0.0

No changelog provided for this version.

Reviews

Recommended by broskydagreat - 02 July 2026

As a hobbyist, this is exactly the kind of plug-and-play code I was hoping to find. I didn't want to reinvent the wheel, and this is very thorough.

Recommended by Subzero Dev - 14 July 2026
Recommended by Tyler Febonio - 20 June 2026

Login to write a review.