2022 Developer Survey is open! Take survey.

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
29 views

How to make an Input Buffer?

I'm trying to make an Input Buffer in Unity C# for later projects, and I've only found this old post from 7 years ago — here is the code: ...
user avatar
  • 1
0 votes
1 answer
36 views

How to get selected value in a dropdown

I made a simple survey from a guide on YouTube. The trouble is that dropdowns are not mentioned in there, and I have totally no idea how to get the selected text value from it. I tried multiple ...
user avatar
0 votes
1 answer
24 views

Understanding User Input Behind the Scenes?

I am a bit confused on how user input is actually received and processed behind the scenes in a game engine. Let's say I have a simplistic game loop as follows... ...
user avatar
  • 101
0 votes
0 answers
12 views

Unity - One client can control all player objects in a multiplayer game (Netcode and Input System)

TL;DR Clients can control only their player objects with keyboard, but all players with gamepad (using Netcode for Game Objects, Unity Input System and a PS4 Controller) I am working on a multiplayer ...
user avatar
0 votes
0 answers
33 views

Unity Input Buffers

I’m working on the framework for my 2.5D fighting game in Unity (it’s gonna be similar to Street Fighter IV) and I’ve got movement down so I want to start adding attacks. Since there’s going to be ...
user avatar
0 votes
1 answer
23 views

How to use OnDrop on non-UI elements?

I'm new to Unity and coding (C#), so sorry if this is a novice question. Is the OnDrop function only usable for UI elements? I am currently making an ARPG Card game ...
user avatar
0 votes
1 answer
19 views

Player object changes position when I click the pause button [duplicate]

I have a simple mobile game where every time I touch the screen, the car changes direction. The thing is, I need to implement a pause button, but when I click pause I need the car to stay still and ...
user avatar
0 votes
1 answer
54 views

Move camera when dragging right and left

I am making a 2D game using Unity, and in the game you see the world from the side like in the first Super Mario games. But instead of moving the camera by walking, I want to move the camera by ...
user avatar
0 votes
1 answer
19 views

Menu not disappearing after input

I am having some issues with the UI and the Input system. What I am trying to do is "simply" to make a menu appear and disappear upon pressing a certain key. To do so, I created an animator ...
user avatar
  • 176
0 votes
1 answer
20 views

XInput (SharpDX) not returning 0 on thumb sticks when they're idle

When querying XInput for the status of the thumb sticks, it doesn't return 0 when the sticks are not in a moved position. Instead, it returns an arbitrary value which is a small portion of the value ...
user avatar
  • 84
1 vote
0 answers
25 views

How to detect when the player presses the % key? [closed]

I want to use the "%" (percent) sign to do something in my game. I tried checking for KeyEvent.VK_DOLLAR but nothing happened. But it works perfectly with ...
user avatar
  • 15
0 votes
1 answer
25 views

How can I make pygame use a specific input device as the mouse?

I am working on (not really a game, but it's using pygame so I hope my question is on topic here). The program appears to be looking at /dev/input/event0, which is ...
user avatar
  • 121
0 votes
1 answer
50 views

Why do my axis mappings to remap the MoveForward and MoveRight keys not seem to have any effect in-game on Unreal Editor 4.27.2?

Since I have an azerty keyboard instead of a qwerty one I'm trying to remap wasd to zqsd for the in-game playing in Unreal Editor 4.27.2. I've started a new blank c++ project with starter content. ...
user avatar
1 vote
1 answer
215 views

Testing Message-Based Events using Unity's New Input System and InputTestFixture, getting unhelpful error

My player has an Action in the Input System Move, that takes a Vector2 and moves the player based on that input. Straight-...
user avatar
  • 75
1 vote
1 answer
45 views

Unity3D InputSystem works in editor but not in Build [closed]

I am trying to move a camera around with controller input using the new Unity Input System package (Ver. 1.2.0) and everything is working great in the editor. However, as soon as I build the project ...
user avatar
3 votes
1 answer
54 views

How to Correctly Declare Unity's New System Input as an Assembly Definition Reference

I have 3 main assemblies, Core, Character, and Interactable. Interactable and Character both depend on Core. I got an error saying I needed to add TMPro as a dependency for Core, so I did that, and ...
user avatar
  • 75
0 votes
1 answer
32 views

First Person shooter look direction abstraction for InputController, AIController and NetworkController

The problem Suppose I have a game where there are multiple Input Controllers: LocalPlayerController: Reads inputs from the keyboard/mouse/gamepad. ...
user avatar
  • 115
1 vote
1 answer
55 views

Can I disable auto-correct on text fields in Godot?

Background I'm working on a word game and I found it kind of nice to use a hidden LineEdit as my text input. I hide it off screen, force focus on it, and then ...
user avatar
0 votes
1 answer
121 views

Why does speed times delta-time give slow movement?

I'm using glfw's glfwGetTime() function to calculate my time between frames i.e deltaT but when I multiply my desired movement ...
user avatar
0 votes
0 answers
79 views

Unreal Engine 4: The Motion axises values is always zero

I'm trying to add aiming by gyroscope to my game. In the controller's module I parsed gyro/accel data and get the processed axis values, that I send into engine: ...
user avatar
  • 231
0 votes
1 answer
31 views

Capturing hard movement from one side to the other on thumbstick

I am trying to implement a hard pivot, like in Mario game, where the character is moving in one direction then you move the stick in a hard 180 to trigger the pivot animation. My problem is that I ...
user avatar
0 votes
0 answers
165 views

Changing Input.GetMouseButtonDown to use new Input System Package

I want to develop a new football game. I placed a cube called "BallTrigger" in the player's foot area. In this way, I wrote code so that the player can shoot the ball. But when the player ...
user avatar
  • 1
0 votes
1 answer
74 views

CR LF replacement in Unity Input Fields when copy and pasting

I setup a bit of code to detect line breaks using \n char (line feed), from the TMPro_InputField: ...
user avatar
  • 117
0 votes
0 answers
111 views

What is the PS5 DualSense gyroscope and accelerometer values range?

I'm trying to implement aiming in shooter using gyroscope but I can't find the minimum and maximum value for each axis to normalize it to range (-1;1) What is the possible values range?
user avatar
  • 231
1 vote
2 answers
148 views

Disable input and score count in pause menu?

I need some sort of an if statement, which allows me to disable any input and increment score while I'm in the pause menu. The problem is that I don't really understand this kind of pausing code, I'm &...
user avatar
0 votes
1 answer
40 views

Callback to a dynamic value in GameObject.transform

I'm currently writing an InputManager using Unity's "new" input system. The InputManager receives all player input ...
user avatar
1 vote
0 answers
45 views

Touch phase is moved when touch pressure changed

I am trying to scale my object by a finger touch just like in Jelly Shift game. It should scale up/down when I move my finger up and down and it should stop when the touch is in stationary phase. The ...
user avatar
0 votes
0 answers
37 views

How to fix controllers using InputSystem.EnhancedTouch on iOS in Unity 2021.2

I updated my game to latest tech release (2021.2) and everything seems to be working totally fine (in the Unity editor). However once I build my game to iOS, all controllers that are using ...
user avatar
  • 133
0 votes
0 answers
79 views

What is the most performant way for a game engine to poll gamecontrollers?

I am working on a game engine, and currently I hesitate on this decision. I developed a library that allows Dualsense and Dualshock4 devices to be used in the engine. XBox Support is made possible via ...
user avatar
0 votes
1 answer
309 views

Input.GetAxisRaw not returning a 0 in Unity

this is extremely frustrating, basically Input.GetAxisRaw only ever returns a 1 or -1. see my code below ...
user avatar
0 votes
0 answers
102 views

adding flying movements to Unity's NEW StarterAssetsInputs

I'm trying to add a flying feature to my character. I set up the Third Person Controller using the newest StarterAssetsInputs (capsule) which contains it's own ...
user avatar
0 votes
0 answers
29 views

Huge input lag in C++ DX9 application when having many entities

So I have created a 2D game engine used for creating top down singleplayer shooters and now I encounter some massive input lags when I have spawned a few entities (maybe 20 opponents). This results in ...
user avatar
0 votes
0 answers
175 views

Why is mouse sensitivity so high in WebGL build?

I made an FPS game in unity3d and exported it to WebGL. When I tested that, however, the mouse sensitivity was quite a bit higher than in the Unity application itself. I used the standard assets ...
user avatar
  • 101
0 votes
0 answers
22 views

How to smoothly move in FixedUpdate using touches on mobile?

I have a serious issue for over a week now and no matter how - I can't make it work. I have a simple movement system, where I move the player on the X position: ...
user avatar
  • 2,502
0 votes
0 answers
57 views

Using UI buttons for Input Manager

My character is supposed to be moved by 4-directional joystick. Until today I was using basic Input Manager for handling this from keyboard. I mean Horizontal and Vertical Axis. How can I make it so ...
user avatar
  • 1
0 votes
0 answers
16 views

Why Unity misses some of my mouse click? [duplicate]

So i have a simple shooter game, and i need to shoot with mouse click. I use Input.GetMouseButtonDown(0), but it seems that if I click too fast only a few actually ...
user avatar
  • 88
0 votes
0 answers
108 views

InputSystem “Invoke Unity Event” don't respond to input

I was making the Input Systen code for my game. I was about to test it and I realized that the controls don't respond. Here is how I've configured my PlayerInput component: And here is how I've set ...
user avatar
0 votes
0 answers
278 views

How to change control schemes?

I have been experimenting with Unity's new input system, but one thing I don't understand and couldn't find the answer for is how you change between control schemes. Basically, I want my game to ...
user avatar
0 votes
2 answers
134 views

Use Buttons based on Key Presses instead of Mouse Click

I have a UI button. I want a function to be called whenever I press a specific key on my keyboard while my mouse is hovering over the button. I want to make something similar to UI in Ark SE where you ...
user avatar
0 votes
1 answer
67 views

Stride: Gamepad (DS4) Input Not Working in CSharpBeginner Example

I have only Microsoft build tools and Visual Studio Code installed (not Visual Studio). The CSharpBeginner example from the Stride Game Studio seems to generate, build and run fine using the Game ...
user avatar
0 votes
0 answers
40 views

Add a virtual joystick to a top down 2D game that uses Input.GetAxis

I have a 2D top down game with a perfectly working movement system, however, I decided to switch to mobile, and faced a problem. I HAVE NO IDEA how to add add a Joystick (well, adding it is not that ...
user avatar
0 votes
1 answer
27 views

Trigger Button with specific key only

I am having trouble understanding how to trigger a UI button with a specific joystick key only. Currently i have a pause menu in which i have several buttons. By pressing start i set the game time ...
user avatar
  • 176
1 vote
1 answer
250 views

Unity Input: Thumbstick works in editor, not in WebGL

I've built a game in Unity 2017.1.1f1 for the web. I have inputs to allow user to play with either the keyboard or a gamepad (in my case, a Gamecube USB). So far as I can tell, all controls work fine ...
user avatar
  • 135
1 vote
0 answers
131 views

Unity Input System: How to handle input from specific device types when the binding abstraction fails?

Is there a way for Input System code to determine what kind of device generated an Input Action's current event, so that it can be filtered based on device type? The example I have is an Orbit Camera ...
user avatar
  • 131
1 vote
0 answers
184 views

What is the new Input System equivalent of Input.GetAxis("Mouse X")?

At first, it seems that Mouse.current.delta.x.ReadValue() would be the most equivalent, but they give different outputs. The purpose is porting old Input code to ...
user avatar
0 votes
1 answer
42 views

Timing User Inputs for Inventory on 60UPS game loop

I'm making an inventory system for my pure Java game right now. Currently, the game runs at a 60UPS, and inputs are checked each update. I have inputs set up using arrays of the current update and ...
user avatar
0 votes
1 answer
82 views

Best ways to navigate a single step on a hexagonal grid depending on input

Problem In my puzzle game, the player moves one step at a time on a hexagonal grid. (Not an action game.) The sequence of steps is important for the gameplay, so it is not only about getting from A ...
user avatar
0 votes
2 answers
356 views

How to use Left-Shift to run?

I need to use Left-Shift to run, but I can't figure out how to do so. Here my code: ...
user avatar
0 votes
1 answer
41 views

Unpausing a game when a TouchScreenButton node is released

I'm making a mobile game in the Godot game engine. I made a spike scene where the spikes will respawn at a random time in a particular position moving upwards. Then I instanced the scene in the main ...
user avatar
0 votes
0 answers
23 views

How to detect two different mice at the same time, and record their separate movements? [duplicate]

I would like to use two computer mice simultaneously, and to record data their separate movements on windows. I have successfully used TeamPlayer to create two cursors, but the software that I am ...
user avatar

1
2 3 4 5
12