Questions tagged [input]
Input is data provided to a game via player interaction (through the mouse, keyboard, gamepad, et cetera).
634
questions
0
votes
1
answer
24
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
53
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
86
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
22
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
49
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
52
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
277
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
68
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
108
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
0
answers
34
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 ...
0
votes
1
answer
75
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
44
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:
...
0
votes
0
answers
45
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 ...
0
votes
0
answers
74
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
44
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
95
views
0
votes
1
answer
279
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
34
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
150
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
487
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
103
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
114
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
132
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
2k
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
0
answers
65
views
How to map south button on gamepad to behave like the left mouse button?
How would I tell Unity that the left mouse button is being pressed when I actually press the south button on a gamepad?
0
votes
1
answer
93
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
131
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
365
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
51
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
415
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
84
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
87
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
100
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
162
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
0
answers
99
views
Windows Raw Input - Filtering done by kernel/driver causing handle to be null?
I have been working on win32 input code using Raw Input and I notice that certain buttons/wheels on mice or touchpad devices will return a null pointer as the device handle.
According to a comment on ...
0
votes
0
answers
35
views
CallbackContext Canceled not being called with 2 Gamepads
I have an issue with local multiplayer when 2 gamepads both input movement with left stick
CallbackContext is not called for the 1st gamepad when it releases input and the 2nd gamepad continues input -...
0
votes
1
answer
235
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
458
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
136
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
46
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, ...
1
vote
1
answer
281
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 ...
0
votes
1
answer
186
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 ...
1
vote
0
answers
31
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 ...
2
votes
2
answers
166
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 ...
3
votes
1
answer
928
views
Caret not visible with TMP_InputField created from script
I'm modding an Unity game. I don't have access to its source, to any Unity editor or assets. All I have is BepInEx and some C# scripting, plus whatever Visual Studio can decompile from dlls.
I create ...
0
votes
0
answers
123
views
How can I change the texture of a prefab clone when it's clicked?
I have a prefab (called ArableLand), and when I click on the ground in the play mode, the ArableLand prefab instantiates a clone of itself.
For example, if I click 3 times on 3 different places, then ...
1
vote
0
answers
244
views
How to record inputs and play them back for a demo?
I was curious how I can implement a good system for recording inputs to make Quake/Doom style demos in Unity.
I'm relatively new to game dev so figured I'd ask some people with actual experience.
0
votes
1
answer
64
views
Arrow key presses stop affecting game after pressing them 4-5 times
I'm trying to program a simple space shooter and my goal right now is that when the player presses down and holds a key, the ship accelerates to a max velocity.
I have that somewhat; the problem is ...
0
votes
1
answer
45
views
How to handle keyboard input arrow keys for a 2.5D Platformer
I need a higher level abstraction for keyboard input for a 2.5D platformer.
Like I know left and right is pressed, but I want to consider things like,
left is held down for more than one second, start ...
1
vote
0
answers
61
views
Click & Drag: Move the Camera vs. the World
I've been tasked with finding out more information as it pertains to "Click & Drag" to change the users viewpoint in a scene, but I'm having troubles finding any definitive information.
...