Install Asset
Install via Godot
To maintain one source of truth, Godot Asset Library is just a mirror of the old asset library so you can download directly on Godot via the integrated asset library browser
![Touch JoyPad (Gamepad) thumbnail image](https://img.godotassetlibrary.com/2EvzpITrp5R2igwqfdsn_zG7B3lPgTE9URZ6s2YrI6s/rs:fit:640:360:0/g:no/aHR0cHM6Ly91c2VyLWltYWdlcy5naXRodWJ1c2VyY29udGVudC5jb20vMzAxOTY5OTIvOTIzMDQyMjktZmUwMTU4ODAtZWY3My0xMWVhLTgxMjAtYmVhY2FhNzgyOTRlLnBuZw.webp)
![Touch JoyPad (Gamepad) thumbnail image](https://img.godotassetlibrary.com/cXVMZDGAh2ip0d2SpG2EuRYuOTFP1pvVl2irXe5k0hM/rs:fit:640:360:0/g:no/aHR0cHM6Ly91c2VyLWltYWdlcy5naXRodWJ1c2VyY29udGVudC5jb20vMzAxOTY5OTIvOTIzMDQyNTQtMjhlYmFjODAtZWY3NC0xMWVhLTgwMWUtMzUyNzA4NWE1ODBhLnBuZw.webp)
![Touch JoyPad (Gamepad) thumbnail image](https://img.godotassetlibrary.com/D4WwX9MGv2cg165a_jta-mvXPe0XDZoYGOipfb9qANc/rs:fit:640:360:0/g:no/aHR0cHM6Ly91c2VyLWltYWdlcy5naXRodWJ1c2VyY29udGVudC5jb20vMzAxOTY5OTIvOTIzMDQyMTgtZTE2NTIwODAtZWY3My0xMWVhLTkyYWMtZjEzNzczZjMwNDMyLnBuZw.webp)
![Touch JoyPad (Gamepad) thumbnail image](https://img.godotassetlibrary.com/gnE8rhHv8Y5Fsi-KZRSIc1HJcgnBaZgGcHKmzT29c3o/rs:fit:640:360:0/g:no/aHR0cHM6Ly91c2VyLWltYWdlcy5naXRodWJ1c2VyY29udGVudC5jb20vMzAxOTY5OTIvOTIzMDQxODYtOGQ1YTNjMDAtZWY3My0xMWVhLTkzZWMtZmUzZTFjODQyNzExLnBuZw.webp)
![Touch JoyPad (Gamepad) hero image](https://img.godotassetlibrary.com/LOPJOYxwmMtyz6_EEY6VxudNCRrNR6w8ECsROJ-yhio/rs:fit:1920:1080:0/g:no/aHR0cHM6Ly91c2VyLWltYWdlcy5naXRodWJ1c2VyY29udGVudC5jb20vMzAxOTY5OTIvOTIzMDQyMjktZmUwMTU4ODAtZWY3My0xMWVhLTgxMjAtYmVhY2FhNzgyOTRlLnBuZw.webp)
Quick Information
![Touch JoyPad (Gamepad) icon image](https://img.godotassetlibrary.com/acPImq2sjCHG4Zlv7tbmOcrakczWSJd7mwmBKYVyS6s/rs:fit:50:50:0/g:no/aHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL3NoaW5uZWlkZXIvZ29kb3RfdG91Y2hKb3lQYWQvbWFzdGVyL2ljb24ucG5n.webp)
Touch JoyPad (Gamepad)
This is easy way to put a joypad in your godot project.
Supported Engine Version
3.2
Version String
1.0.0
License Version
MIT
Support Level
community
Modified Date
3 years ago
Git URL
Issue URL
Godot Touch Joy Pad
Install:
Manual Mode.
- Create
plugins
folder in project root. - Download this repo and put all files inside a
touchJoyPad
folder (inside aplugins
folder). - Use
touchJoyPad.tscn
scene in your project.
- Create
Git Mode.
- if you not started git repo before, start it
git init
- in first time
git submodule add https://github.com/shinneider/godot_touchJoyPad.git ./plugins/touchJoyPad
- in next repo clone, clone normally, after clone, run
git submodule update --init --recursive
- if you not started git repo before, start it
Configuration:
Basic configuration.
- Arguments.
After import scene check Inspector tab of Godot
- Left Pad Style:
Select
tipe of Joy
, a classicalD-Pad
or a modernAnalog
. - Map Analog to DPad:
Analog send analogic signal(between -1 and 1), but if set this, the
signal is converted
to nativesui_left
,ui_up
,ui_right
andui_down
signal (if you need, is possible to receive analog singal too). - Visible Only Touchscreen:
Visible
only
indevices with touch
capabilities. - Analog Tap To Show:
This
show the analog
just ifuser tap in the screen
.
- Left Pad Style:
Select
- Arguments.
Receive Analog movimentation.
- The touchJoyPad is attached to the group Joystick see this
- On each Analog movimentation ths function
analog_signal_change
is fired. The funcanalog_signal_change
analog_signal_changeanalogPosition
andanalogName
. - The
analogPosition
argument
is x,yAnalog coordinates
(x and y containsvalues between -1 and 1
) being thatx < 0
is moving to theleft
,x > 0
moving toright
,y < 0
movingdown
,y > 0
moving toup
, and finallyx = 0 and y = 0
isn't moving
. - The
analogName
argument
is way tofilter Analog signal
if you decide tore-use
the Analog scene (Ex: two analog in screen
, left for movimentation and right for aim). - Ex:
analog_signal_change
implementation.func analog_signal_change(analogPosition, analogName): # When to move Analog, send signal to natives ui signal # but implements a dead zone in 20% in the curso of Analog # This is good for to avoid user mistakes in move hand Input.action_press("ui_left") if analogPosition.x < -0.2 else Input.action_release("ui_left") Input.action_press("ui_right") if analogPosition.x > 0.2 else Input.action_release("ui_right") Input.action_press("ui_down") if analogPosition.y < -0.2 else Input.action_release("ui_down") Input.action_press("ui_up") if analogPosition.y > 0.2 else Input.action_release("ui_up")
Analog Tap To Show.
- If you
need to use this
, you need toput de scene inside
aViewportContainer
or aerror occurs
andnot compile
. - This
occurs because
theViewportContainer
isused to determine a area
ofTap To Show
. - Ex:
two Analog
,one in each corner
of the screen, theViewportContainer
determines area of each Analog
, without this all screen active the two analogs
- If you
Obs in standalone use of
DPad
orAnalog
.- If you need to
use manually
the plugins,you need to implement logic
for this cases:Hide
(Becauseenable = false
,mantains the touch area
,i sugest
move button for out of the screenposition = Vector2(-1000, -1000)
).Hide if touch device
(Check if touch device usingOS.has_touchscreen_ui_hint()
).Pass the param AnalogTapToShowContainer
(Used for the Analog in Tap To Show)for default he search ViewportContainer in up parent
, but if you need, just specify a parent for her (Ex:$"leftPad/JoyStickLeft".AnalogTapToShowContainer = get_parent()
).
- If you need to
Help in Test/Debug.
- to help in your test in desktop without touchscreen, enable godot touch emulator.
- Go to
Project Settings
, on the left menu searchPointing
insideInput Devices
. - Enable
Emulate Touch From Mouse
, on this enable, mouse is used as touch on the screen.
Images:
Using D-Pad:
D-Pad Pressed:
Using Analog:
Using Analog with tap to show:
Credits
- kubecz3k First version of code analog.
- gswashburn Port code analog to Godot 3.
- kenney.kl Art for analog and D-Pad.
This is easy way to put a joypad in your godot project.
Reviews
Quick Information
![Touch JoyPad (Gamepad) icon image](https://img.godotassetlibrary.com/acPImq2sjCHG4Zlv7tbmOcrakczWSJd7mwmBKYVyS6s/rs:fit:50:50:0/g:no/aHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL3NoaW5uZWlkZXIvZ29kb3RfdG91Y2hKb3lQYWQvbWFzdGVyL2ljb24ucG5n.webp)
Touch JoyPad (Gamepad)
This is easy way to put a joypad in your godot project.
Supported Engine Version
3.2
Version String
1.0.0
License Version
MIT
Support Level
community
Modified Date
3 years ago
Git URL
Issue URL