Code Monkey home page Code Monkey logo

virtual-joystick-godot's Introduction

Godot Virtual Joystick

A simple virtual joystick for touchscreens, with useful options.

GitHub Page: https://github.com/MarcoFazioRandom/Virtual-Joystick-Godot

Godot Engine: https://godotengine.org

PREVIEWS:

Easy to setup:

Easy to use:

OPTIONS:

  • Joystick mode:

    • Fixed: The joystick doesn't move.
    • Dynamic: Every time the joystick area is pressed, the joystick position is set on the touched position.
  • Dead zone size: If the tip is inside this range the output is zero.

  • Clamp zone size: The max distance the tip can reach.

  • Visibility mode:

    • Always: Always visible.
    • touchscreen only: Visible on touch screens only (will hide if the device has not a touchscreen).
  • Use input actions: if true the joystick will trigger the input actions created in Project -> Project Settings -> Input Map

HELP:

  • The Control parent of the joystick is the area in which the joystick can move in Dynamic mode.
  • For moving the joystick inside his area, select it, right click, turn on "Editable Children" and then change the position of the Base node.
  • With "Editable Children" turned on you can also edit the joystick textures and colors.
  • To be able able to use multitouch and mouse, I advise you got to Project -> Project Settings -> General -> Input Devicesto and turn ON "emulate touch from mouse" and turn OFF "emulate mouse from touch".
  • Create a CanvasLayer node and name it "UI", it'll contain all the UI elements, then add the Joystick scene as a child of the UI node and move it where you prefer.
  • An example scene is provided in the "Test" folder.

virtual-joystick-godot's People

Contributors

aaronrecord avatar eawebdev avatar jack3g avatar marcofaziorandom avatar vlaska 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.