GithubHelp home page GithubHelp logo

delectus98 / pinchpancamera Goto Github PK

View Code? Open in Web Editor NEW

This project forked from divirad/pinchpancamera

0.0 1.0 0.0 55 KB

A touchscreen optimized camera control system for common 2D top-down strategy games but for mouse.

License: MIT License

GDScript 100.00%

pinchpancamera's Introduction

PinchPanCamera

Version badge Version badge


Author badge PayPal badge

Icon

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)

Source of Demo Map

Usage

  1. Download the addons/ppc folder and put it into your addons folder of your project.
  2. Enable the PinchPancamera Plugin in your Project Settings
  3. Add the PinchPanCamera Node to your Project like a regular Camera (2DNode/Position2D/PinchPanCamera)
  4. Credit us in your Game, pls :)

Short Documentation

Export Variables

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

Signals

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

pinchpancamera's People

Contributors

thismusicdude avatar delectus98 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.