Questions tagged [input]
Input is data provided to a game via player interaction (through the mouse, keyboard, gamepad, et cetera).
644
questions
0
votes
0
answers
40
views
Are there any games where movement tricks (e.g wavedashing) have unpredicability to them and don't have 100% clear steps for reproduction?
I'm making a game where the main movement mechanic is that you drag your mouse to make the character move. The character is a fish flopping on land. The game is a 3d-platformer. So you drag or flick ...
0
votes
1
answer
87
views
Dynamically-created cube with mouse follow script does not follow mouse
The goal of this script is that the object it's attached to should move with the mouse.
...
11
votes
5
answers
279
views
When translating controls into German, do I assume a German keyboard?
I am translating a video game into German, and I am wondering about the keys listed for the controls in the settings. On an American keyboard we have QWE, AD, and ZXC forming a square that the player ...
1
vote
0
answers
36
views
(UE 5.4.2) (Enhanced Input System) Touch Pressed trigger fires only once
As you can see on image I have three Control Bindings
Space Bar - works perfectly on desktop. I can press several times ...
0
votes
0
answers
15
views
New Input System and Touch Ended / Pen Lifted / Mouse Up
How does one use the new input system to determine the states:
Touch Ended
Pen Lifted
Mouse Up
I've tried subscribing to canceled (isn't always triggered, seems to false trigger). There does not ...
0
votes
0
answers
25
views
Dualshock controller gives no input on android build
I want to create a 3D game for android, and move the first person character with a PlayStation 4 default controler (DualShock4). In the unity editor, I can move, look and jump freely how I want, ...
0
votes
1
answer
44
views
Cannot read value of type 'Vector3' error in Input System package
I'm a Unity newbie. This time, I'm trying to make the Player operable with an Xbox controller using PlayerInput. However, when I control the player, I get these errors:
Errors that occurred:
[20:35:...
0
votes
0
answers
16
views
How to use a key to stop playing the current animation, and replay it from the beginning?
In my Unity project, I tried to use a key to stop the current animation and immediately play it from the beginning again. I also tried to control the delay before I can press again.
The following ...
2
votes
1
answer
122
views
Cannot read value of type 'Vector2' from WASD KeyControl
I'm getting these error messages when I try to use Unity's new Input System package:
Cannot read value of type 'Vector2' from control '/Keyboard/w' bound to action 'CharacterControls/Movement[/...
0
votes
0
answers
62
views
SDL2 Events how to avoid monolithic control statement?
I'm using SDL2 in my game engine and I'm trying to figure out how I can prevent having a monolithic control statement like this:
...
1
vote
0
answers
54
views
Controlling Input Handling in Turn-Based Game
I've been building a turn-based style RPG in Typescript based upon this ROT-JS Tutorial. For the most part it's fairly clear and I have a handle on everything, except I've begun building out a ...
0
votes
1
answer
53
views
Chain cutting swipe input skips over chains
I have a game where you need to cut chains, similar to Cut The Rope. I want to develop it for Android, so I need mobile controls.
For detecting swipes I used ...
0
votes
1
answer
140
views
How to to make KeyListener do an action only once per press, even if the button is held down?
I'm trying to make a turn-based game where my character is allow to move in any direction, but only by as much as the dice rolled allows him.
My problem is with how I'm using ...
1
vote
2
answers
228
views
How do i get key input using c#
To change key configuration i need to get the key input but after looking around i havent found any way of doing that using c#.The other way is using the Gd programming language.but i cant do that as ...
0
votes
0
answers
80
views
How to add Input Modifiers in C++
I have a blank Input Mapping Context to which I add the Input Actions that I require at specific times during my game. For example, when I make a roll, I simply add the camera movement Input Action ...
0
votes
2
answers
116
views
What happens with global/singleton objects when using ECS?
As I've been learning about ECS one thing that gets me confused are things like input which in my case has usually been some singleton that gets polled or in one project was event based where code can ...
0
votes
1
answer
69
views
Drag-select multiple units code Godot 3.5
The code from where I based my script.
The code I have has the these 2 problems:
The visual area for the player to see what unit are going to be selected doesn't work as intended, if I start dragging ...
2
votes
1
answer
172
views
Detect if a key other than "this" key has been pressed
I'm wondering if there is a way to detect if the key being pressed is NOT matching a specific KeyCode.
I tried using: ...
2
votes
1
answer
99
views
How to make redirected player movement respond to same key?
I have a 2d game (Godot 4) with different rooms with portals to go between them, and some portals redirect the direction of the player while still holding the same key. I have that working so far, but ...
0
votes
0
answers
35
views
How can I map controls of an existing Unity application, when no UI is provided?
I have an Unity application, that someone made for me in the past. It is provided as single binary file for Linux in this case.
It features a very simple "launcher" which let me select the ...
0
votes
1
answer
119
views
Why can't I press buttons after re-enabling the UIDocument?
I have this UI with buttons that should be clickable whenever the UIDocument is enabled, but for some reason whenever I disable and then re-enable the UIDocument (in the second code block), the ...
0
votes
1
answer
76
views
How To Implement Button-Matching Minigame In New Input System
Good Afternoon,
I'd like to incorporate a button-matching minigame into my game.
I have an InputActionMap made specifically for this minigame. One of the buttons ...
0
votes
2
answers
3k
views
Unity New Input System - What Is The Correct Way To Check If Any Button From An Action Map Was Pressed?
Good Morning All,
I am using Unity's New Input System. I have an Action Map created called 'Menu'.
Currently, this is how I check for specific button presses.
...
0
votes
0
answers
76
views
Ignoring global rotation in gyroscope controller
I'd really appreciate some advice from you guys. I am trying to process a gyroscope input and map it to my game, i.e. player tilts their device and the character on screen moves left and right.
...
0
votes
2
answers
140
views
Player double jumps immediately with a single press when using new Input System
I am making a 2.5D runner game and I want to switch my input from the legacy Input Manager to Unity's new Input System package.
I am facing a problem when I'm trying to implement the double jump when ...
0
votes
1
answer
89
views
How to use WASD to move camera between a collection of position marker objects?
How can I move one camera between two positions along the cardinal directions?
Using W/A/S/D keys, I want to move the camera from one empty object to another on the xy plane. Those empty objects ...
0
votes
0
answers
137
views
Input axis defined but not working
I'm trying to use a simple code example to move a square object like this:
...
0
votes
1
answer
68
views
Input axis from keys
I'm making a game engine from scratch and I'm currently handling the inputs. The low level handling is done, and now I would like to provide higher level input listeners, such as axis.
I've failed to ...
0
votes
1
answer
129
views
0
votes
1
answer
689
views
Is it possible to detect if the cursor is over a GameObject with a specific tag?
I've tried quite a few things, but none of them have worked reliably. Here is what I'm currently using:
...
0
votes
1
answer
36
views
OpenGL ES + SDL texture can only be moved with the combination of two keys
I making a simple game following JoeyDeVrieses guide on OpenGL, I followed the guide and created an input system, which handles the keyboard inputs and quitting the application, the issue is I cannot ...
0
votes
1
answer
223
views
How do I play a video in Unity using input text
I'm trying to play a video when a text command is typed.
What I expect to happen is the user inputs "play video 1" in an input text box, and after the command is sent via a button press, the ...
0
votes
1
answer
1k
views
New Unity input system not working/responding
I'm trying to use the new input system for my 3rd person character in Unity. However, whenever I press the WASD keys, or try to move the camera, nothing happens. I've looked everywhere, but can't find ...
1
vote
1
answer
117
views
Where can I find a reference to the possible arguments of AddBinding?
In the new input system of Unity, the function AddBinding gets a string as an input. In
this link there are several examples, such as "<Mouse>/delta" or "<Keyboard>/alt"...
0
votes
0
answers
141
views
Good design for player input handling in 2d game
I am working on a java 2d game. Keeping things short, I'd like to improve my current input handling. Basically the player can move up/down/left/right with WASD, perform an attack with mouse left click ...
1
vote
1
answer
290
views
How to create a default binding for an InputAction?
When I have an InputAction in a Unity component, like this:
...
2
votes
1
answer
5k
views
Triggering Enhanced Input Actions via inputs with modifier keys (Shift/Alt/Ctrl) in UE5
This question refers to the use of enhanced input in Unreal Engine 5. Whenever I say "modifier", I refer to modifier keys such as Shift, Alt, and Ctrl (rather than the Input Modifers such as ...
0
votes
1
answer
181
views
Accepting user input in continous game loop
I have a game loop that simply iterates through every entity and calls entity.update()
...
0
votes
1
answer
238
views
Unity PlayMode tests - cannot find UnityEngine.InputSystem assembly
I'm trying to simulate user input in my Unity PlayMode tests. I've been reading this guide on the Unity website about adding input simulation into my tests. Specifically, it mentions I need to add the ...
0
votes
1
answer
727
views
How do I know currently active TMP_InputField in unity
I have a list of TMP_InputFields on my canvas like OTP boxes. I made it in such a way that the cursor automatically moves to the next box once the user types something in the current box. I am ...
1
vote
0
answers
58
views
How to determine if input is correct in a riddle game?
I'm programming a basic puzzle game that will involve quite a few riddles. The player will be presented with a riddle and a textbox to put their answer in. The issue is that users can input whatever ...
0
votes
1
answer
859
views
Force Feedback on joystick device using SharpDX DirectInput API
The Goal (for context)
Get input from a USB joystick device in the Unity Game Engine and activate Force Feedback functionality on the joystick from Unity.
The Method
I am using the SharpDX.DirectInput ...
1
vote
0
answers
96
views
Moving to the mouse position on mouse-click
I am migrating my projects to the new input system in Unity.
I have a project in which the user can point the mouse anywhere on the screen, then click the mouse button, and the player moves to the ...
0
votes
1
answer
103
views
How to capture consecutive key strokes for different input modes
I'm making an Ultima spinoff which requires a lot of key strokes for actions. For example the arrow keys are for movement BUT once the player presses down the 'T' (talk) key the arrow keys are used ...
0
votes
1
answer
127
views
Can player input be missed while yielding WaitForSeconds?
I just wanted to fact check myself on a scenario where the player may be locked out of input.
With this example, there is a chance that the player's input will not be received if they happen to press ...
2
votes
1
answer
278
views
How to get Unity InputSystem to use OpenXInput or at least DirectInput for XInput controllers?
I want to workaround the XInput disadvantage of having just four controllers.
I have found out about OpenXInput and compiled it, but I’ve got no idea how to force Unity to use the new DLL, since I did ...
0
votes
1
answer
361
views
How to change GameObject position using new Input System?
I was asking myself if you could change the position of a game object with the input of the player, with the new input system.
That is, with something like this:
...
0
votes
1
answer
789
views
Replace Input.GetKey(KeyCode.Mouse0) with New Input System
I was implementing the new Input system for my game, when I saw that I still had a script in my player that wouldnt allow me to start the scene, because the script still operated with the old input ...
0
votes
1
answer
164
views
Key presses and game quit sometimes delayed by seconds
U'm currently trying to develop a 2D RPG similar to early Final Fantasy titles for the NES.
Up until now I've been reading C++ tutorials on SDL2 and doing my best to convert the concepts into OCaml. ...
1
vote
0
answers
65
views
InputSystem behaves differently in Build and Editor
I'm trying to map WASD, Arrow Keys and Gamepad Left Stick to camera movement.
So A/Left arrow is negative, ...