Godot Plugin for a touchscreen optimized camera control system for common 2D top-down strategy games.
(Works also with mouse when Emulate Touch with Mouse is enabled)
- Download the
addons/ppc
folder and put it into your addons folder of your project. - Enable the PinchPancamera Plugin in your Project Settings
- Add the PinchPanCamera Node to your Project like a regular Camera (
2DNode/Position2D/PinchPanCamera
) - Credit us in your Game, pls :)
enabled : bool
enables functionallity of the PinchPanCamera Node
natural_slide : bool
if false it inverts the input
current : bool
if current is true, the PPC Node is the current Camera
smoothing : bool
enables smoothe dragging
smoothing_speed : int
the smoothness while dragging
min_zoom_factor : float
max_zoom_factor: float
zoom limit to prevent "infinite-zoom"
drag_deadzone_x : float
drag_deadzone_y : float
deadzone of dragging
show_debug_icon : bool
shows with the ppc icon the position of the Position2D
for debugging purposes
zoom_in()
throws when user is zooming in
zoom_out()
throws when user is zooming out
just_pressed()
throws when user touched the screen the first time before dragging
dragging()
throws when user is dragging the camera