Drag camera with the mouse (or touchscreen)
Move a camera by dragging the mouse (or touchscreen).
Authors and contributors to this experimental extension: ddabrahim, VictrisGames.
Move a camera by dragging the mouse (or touchscreen).
How to use:
- Run this action on every frame that you want the camera to be movable by the mouse (or touchscreen)
- Select the mouse button to use (choose "left" for touchscreen)
- Select which directions the camera will move (vertical, horizontal, or both)
- Select the layer that will be moved
Tips:
- If no parameters are selected, the camera will move in both directions when the left mouse button (or touchscreen) are dragged.
Tip
Learn how to install new extensions by following a step-by-step guide.
Actions
Drag camera with the mouse
Move a camera by dragging the mouse (or touchscreen).
See parameters
- Parameter 1 (🔢 Number): Camera number
- Parameter 2 (🔤 Layer name (String)): Camera layer (default: "")
- Parameter 3 (🔤 String): Directions that the camera can move (horizontal, vertical, both) (one of: "vertical", "horizontal", "both")
- Parameter 4 (mouse): Mouse button (use "Left" for touchscreen)
Technical note: parameters 0, 5 are internal parameters handled by GDevelop.
This page is an auto-generated reference page about the Drag camera with the mouse (or touchscreen) extension, made by the community of GDevelop, the open-source, cross-platform game engine designed for everyone. Learn more about all GDevelop community-made extensions here.