Skip to content

HubbleCommand/mobile_controls

Repository files navigation

Mobile Controls

Some mobile virtual controls for Godot 4.x.

Sample textures are from Kenney.

This asset exists, but I required a few more features.

virtual joystick

Virtual Joystick

Virtual Joystick for use on touchscreens to emulate a controller joystick.

The texture for the point / inner texture MUST be smaller than the outline texture.

If you see the following error in your logs, it most likely means that you need to set axis to something other than "Joy Axis Invalid":

Condition "p_axis < JoyAxis::LEFT_X || p_axis > JoyAxis::MAX" is true.

Screen Gestures

Screenspaces / canvas gesture detector. Reports pan, rotate, and scale gestures.

Supports floating Virtual Joystick. When adding floating Virtual Joystick, make sure to add the path to a pre-configured floating joystick. Node that this is enabled on long presses / clicks, so only one can be visible at a time.

Project Setup

Project Settings -> Input Devices -> Pointing

Make sure to disable all input emulation,

  • "Emulate Touch From Mouse"
  • "Emulate Mouse From Touch"
  • "Enable Long Press as Right Click"

and enable "Pan and Scale Gestures".

project settings

For more details, read the corresponding documentation.

About

A collection of mobile virtual controls for Godot 4.x

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published