Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mreliptik/slider_gamepad
Godot 4 addon to add better joystick and dpad support to sliders
https://github.com/mreliptik/slider_gamepad
godot godot-addon godot4
Last synced: about 1 month ago
JSON representation
Godot 4 addon to add better joystick and dpad support to sliders
- Host: GitHub
- URL: https://github.com/mreliptik/slider_gamepad
- Owner: MrEliptik
- License: mit
- Created: 2024-03-17T13:43:33.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-07-09T09:17:09.000Z (7 months ago)
- Last Synced: 2025-01-01T07:28:46.671Z (about 1 month ago)
- Topics: godot, godot-addon, godot4
- Language: GDScript
- Homepage:
- Size: 308 KB
- Stars: 62
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SliderGamepad
Custom nodes to have better joystick and dpad support on sliders.
![]()
## Features
- **Smooth joystick**: hold the joystick in one direction and the slider value adjust smoothly
- **Discrete joystick**: the joystick acts as a button, only updating the value by one each "press"
- **Smooth & discrete**: joystick is in discrete mode, until you hold the direction for more than a threshold time when it switches to smooth
- **Dpad steps**: dpad can modify the value configurable steps instead of the default 1 step## How to use
The addon assumes you have the joypad mapped to the default ui actions: **ui_left**, **ui_right**, **ui_up**, **ui_down**
The dpad discrete function reacts directly to the **InputEventJoypadButton****Step 1: Add a HSliderGamepad or VSliderGamepad**
Add a node as you normally do and choose either HSliderGamepad or VSliderGamepad depending on your needs
![]()
**Step 2: Setup the node**
- **Slider speed**: the speed at which the value is changed (per frame)
- **Dpad step**: the step size when using the dpad
- **Joystick discrete**: sets the joystick in discrete mode
- **Joystick smooth discrete threshold**: time in seconds after which the joystick will switch to smooth when held in one direction (requires joystick to be set to discrete mode)
![]()
## 💁♂️ About me
Software engineer & gamedev. 3D, 2D & VR.
- [Discord](https://discord.gg/83nFRPTP6t)
- [YouTube - Gamedev](https://www.youtube.com/c/MrEliptik)
- [YouTube - Godot related](https://www.youtube.com/@mrelipteach)
- [Twitter](https://twitter.com/mreliptik)
- [Instagram](https://www.instagram.com/mreliptik)
- [Itch.io](https://mreliptik.itch.io/)
- [All links](https://bento.me/mreliptik)## 📔 LICENSE
This project is distributed under the MIT license, which it's free to use, modify and redistribute, for both personal and commercial projects. For more information see [LICENSE.md](LICENSE).