Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions tagged [input]

Input is data provided to a game via player interaction (through the mouse, keyboard, gamepad, et cetera).

Filter by
Sorted by
Tagged with
0 votes
0 answers
11 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 ...
URORU's user avatar
  • 1
2 votes
1 answer
55 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[/...
Fenrir's user avatar
  • 21
0 votes
0 answers
51 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: ...
Konjointed's user avatar
1 vote
0 answers
31 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 ...
Joel's user avatar
  • 11
0 votes
1 answer
50 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 ...
CheckerT's user avatar
0 votes
1 answer
51 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 ...
Silver Lilies's user avatar
1 vote
2 answers
108 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 ...
NEWBIE's user avatar
  • 23
0 votes
0 answers
50 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 ...
afarre's user avatar
  • 111
0 votes
2 answers
84 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 ...
Konjointed's user avatar
0 votes
1 answer
52 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 ...
Progs's user avatar
  • 93
2 votes
1 answer
127 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: ...
sammyiscuul's user avatar
2 votes
1 answer
98 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 ...
value1's user avatar
  • 23
0 votes
0 answers
31 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 ...
dronus's user avatar
  • 101
0 votes
1 answer
93 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 ...
skundu's user avatar
  • 1
0 votes
1 answer
66 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 ...
PayasoPrince's user avatar
0 votes
2 answers
2k 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. ...
PayasoPrince's user avatar
0 votes
0 answers
72 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. ...
Cato's user avatar
  • 93
0 votes
2 answers
133 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 ...
Sami Rehman's user avatar
0 votes
0 answers
66 views

Creating a custom input device for a DTrack wand, using both the new and old input system in Unity 2021

I am currently trying to figure out how to bridge the gap between the old input system and the new one. There is a DTrack wand that I am using, that has a package. Right now, I have a game that is ...
Riker Thomas's user avatar
0 votes
1 answer
83 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 ...
nausikaa's user avatar
0 votes
0 answers
57 views

How can I clearly distinguish between tap and swipe inputs on mobile?

How can I clearly distinguish tapping and swiping touches? This is my interaction script: ...
Byungheon Lee's user avatar
0 votes
0 answers
61 views

How to make action get triggered as long as key is held in Unity new input system

I'm using unity new input system for a local multiplayer game. My PlayerInput sends messages to my CharacterInputListener on every character object, one of such messages is OnDefend(). I want ...
Alakanu's user avatar
  • 705
0 votes
0 answers
115 views

Input axis defined but not working

I'm trying to use a simple code example to move a square object like this: ...
miltone's user avatar
  • 101
0 votes
1 answer
59 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 ...
LucioleMaléfique's user avatar
0 votes
1 answer
115 views

How to prevent accidental double-tap dodge when changing directions?

...
Cei's user avatar
  • 863
0 votes
1 answer
576 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: ...
THE JOATMON's user avatar
0 votes
1 answer
35 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 ...
koogel's user avatar
  • 79
0 votes
1 answer
196 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 ...
La Brown Bag's user avatar
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 ...
Johnathan's user avatar
1 vote
1 answer
112 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"...
Erel Segal-Halevi's user avatar
0 votes
0 answers
129 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 ...
magister's user avatar
1 vote
1 answer
240 views

How to create a default binding for an InputAction?

When I have an InputAction in a Unity component, like this: ...
Erel Segal-Halevi's user avatar
2 votes
1 answer
4k 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 ...
Simon Fischer's user avatar
0 votes
1 answer
150 views

Accepting user input in continous game loop

I have a game loop that simply iterates through every entity and calls entity.update() ...
Michael Moreno's user avatar
0 votes
1 answer
208 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 ...
Samuel Slade's user avatar
0 votes
1 answer
590 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 ...
Craving_gold's user avatar
1 vote
0 answers
54 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 ...
Blue Herring's user avatar
0 votes
1 answer
685 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 ...
Ben's user avatar
  • 111
1 vote
0 answers
91 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 ...
Erel Segal-Halevi's user avatar
0 votes
1 answer
98 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 ...
Nicholas Humphrey's user avatar
0 votes
1 answer
120 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 ...
PayasoPrince's user avatar
2 votes
1 answer
250 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 ...
SurDno's user avatar
  • 41
0 votes
1 answer
331 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: ...
Hammynator's user avatar
0 votes
1 answer
666 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 ...
Hammynator's user avatar
0 votes
1 answer
154 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. ...
Nameless King's user avatar
1 vote
0 answers
57 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, ...
Basic's user avatar
  • 1,278
1 vote
1 answer
359 views

Unity InputSystem will Send but not Broadcast

I'm trying to organise my project so that each MonoBehaviour receives relevant impulses/actions and handles them. I have the following: InputManager: Empty game ...
Basic's user avatar
  • 1,278
0 votes
1 answer
262 views

Use Graphics Raycaster do implement pointer control VR

I am trying to figure out how to allow my players to put in a code to join a group room using photon. Unity seems to suggest using a graphics raycaster but in most sample code it uses mouse input for ...
Doug Ray's user avatar
  • 143
1 vote
0 answers
44 views

Creating an "Aim Mode" toggle button with virtual buttons

I'm trying to make an "Aim Mode" in Stride for a 3rd person, 2D platformer. The idea is that player presses (and releases) a button that activates Aim Mode, and Aim Mode stays on until ...
DusaWitch's user avatar
2 votes
2 answers
283 views

Get and change hold durations of an InputActionAsset's bindings through script

I have an input action in my project that is performed after being held for a length of time. By default it begins after 0.2 seconds, but I'm trying to add a slider to increase or decrease it in my ...
pocketlint60's user avatar

1
2 3 4 5
13