Giter VIP home page Giter VIP logo

godot_input_helper's Introduction

Nathan Hoad

The code that powers https://nathanhoad.net

Writing posts

Create a folder in the /posts directory and name it what your slug/url is going to be (eg. posts/just-start-now).

Now create a .text file of the same name as the folder and put it in that folder (eg. posts/just-start-now/just-start-now.text).

The first lines of the post will be its title, followed by a list of its headers:

# Just start now

- published: 2018-03-06
- tags: games, painting
- share: some-image.jpg

There is a long road between a dream and reality. The path is not well worn and sometimes hard to see.

...

Developing

To run the server just do npm start. Posts will be compiled statically and then a simple asset server will spin up.

In development mode (NODE_ENV !== 'production') the server will watch for changes to posts and templates and recompile/restart when needed.

godot_input_helper's People

Contributors

benjatk avatar daelonsuzuka avatar evanwalsh avatar exerionius avatar hexagonnico avatar magikmw avatar mashumafi avatar nathanhoad avatar spyrexde avatar wachtel1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

godot_input_helper's Issues

Steam Input

Please shoot down this feature request if it's out of scope (which it probably is), but: Steam Input is something that's always been a pain when developing with Godot. When in use, there are scenarios where Godot will see a keyboard rather than a controller, or always thinks an Xbox controller is connected, and of course the user might've remapped everything - and the only way it looks like we'd know is by querying the Steam API.

Rather than implementing a custom solution with GodotSteam - which looks like it'd be complex enough, as it doesn't seem to plug into Godot's Input - would it be possible to detect Steam Input fudgery using this plugin, somehow?

Mouse+keyboard vs controller detection.

Describe the feature you'd like
I would like to have a signal that emits when I switch to using a (mouse or keyboard), or a controller of and kind.

Describe alternatives you've considered
I could implement this myself, I have in the past, but I was hoping this plugin would do it for me.

Thank you

Docs suggest running an example which is not included in the actual addon

Describe the bug
A clear and concise description of what the bug is.

Affected version

  • Input Helper version: 4.3.2
  • Godot version: 4.2.1

To Reproduce
Steps to reproduce the behavior:

  1. Install the addon via the Godot assetlib
  2. Note that res://addons/input_helper/device_tester/device_tester.tscn is not avilable, but the docs suggest it should here

Expected behavior
To be able to find res://addons/input_helper/device_tester/device_tester.tscn

Screenshots
The plugin itself
image

Available resources
image

Switch controller orientation

Hello, thanks for the very useful plugin.
Does the Switch mapping reflect whether the Switch controller is used attached (to screen) or detached? That would affect the orientation of the DPad buttons.

Godot 4 version

I really would like to use this plugin in my Godot 4 project. Will it get updated to that version any soon?

Joypad motion isn't serialized or restored

Describe the bug
When calling InputHelper.serialize_inputs_for_actions(), joypad axis bindings aren't saved, neither can be restored.

Affected version

  • Input Helper version: 4.2.2
  • Godot version: 4.2.rc2

To Reproduce
Steps to reproduce the behavior:

  1. Create an input map that uses a joypad axis
  2. Serialize them with InputHelper.serialize_inputs_for_actions()
  3. Apply the serialized inputs with InputHelper.deserialize_inputs_for_actions(serialized_inputs)
  4. Try to use the previously created input map with a joypad axis

Expected behavior
The joypad axis should be saved and restored properly for the input maps that use them.

Screenshots
None

set_action_key_or_button does not work between gamepad/keyboard

using set_action_key_or_button does not properly swap out joypad/keyboard inputs. Adding exposing "swap_if_taken" to set_action_key_or_button and additionally adding the proper logic to handle the swap between joypad/keyboard would be a possible solution.

Possibly might be better to have a separate optional parameter like "swap_if_taken" called "swap_key_and_button_if_taken" which defaults to false as to not introduce breaking changes.

Godot version 4.1.x

Edit: To clarify, the joy buttons will swap with itself just fine.. but swapping buttons and keyboard inputs dont properly talk to eachother... so setting a joypad button on a spot with a keyboard input wont move the keyboard input to the joypads old location.

Sony PS5 Controller on Mac

Hello, thank you for a great plugin. I noticed that on mac os PS5 DualSense controller is called "Sony DualSense". I patched my local version, maybe you can also add this one to the list

replace_joypad_input_at_index exhibits unexpected behavior on switching from JOYPAD A

Describe the bug
On calling replace_joypad_input_at_index on an index not yet defined for an action that responds to JOYPAD A, will replace JOYPAD A with the new event instead of adding it to the correct index

Affected version

  • Input Helper version: 4.3.3
  • Godot version: 4.2.2

To Reproduce
Steps to reproduce the behavior:

  1. Consider the case in which an action has the inputs [JOYPAD A]
  2. If we call replace_joypad_input_at_index with the action Y at the index 1, the replacing action will be set as JOYPAD A by default, and the final input list will be [JOYPAD Y]

Expected behavior
The input list associated with the action should be [JOYPAD A, JOYPAD Y]. Intead, Y replaced A

Proposed solution
This happens due to the following line @ replace_joypad_input_at_index. On creating a new InputEventJoypadButton, the button_index is set to 0 by default, which is the key for the A button, instead of an invalid button, as it should be.

var replacing_input = InputEventJoypadButton.new() if (inputs.is_empty() or inputs.size() <= index)

This can be fixed by replacing this line with the following, which correctly defines the replacing_input as an invalid one

var replacing_input
if inputs.is_empty() or inputs.size() <= index:
  replacing_input = InputEventJoypadButton.new()
  replacing_input.button_index = JOY_BUTTON_INVALID
else:
  replacing_input = inputs[index]

Emit did_change_signal when no actions are mapped

Is your feature request related to a problem? Please describe.
When an action is updated and there are no actions mapped yet the did_change_signal does not emit. In my game I would like players to be able to add optional key binds for actions.

Describe the solution you'd like
When adding a mapping to an input but there are no inputs already mapped to the action the did_change_signal emits

Additional context
Making this change to _update_input_for_action seems to make it work:

image

An example of the context it might be useful in:

Godot_v4.2.1-stable_mono_win64_pYrsh0W3aN.mp4

Gyro input

Hello,

Have you considering adding gyro input to the helper? I think it'd be useful as it seems like Godot's support for gyro is limited to mobile devices.
Having better support for gyro controllers would be really useful (PS5, Switch, etc). What are your thoughts about it?
Thank you for your great module!

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.