Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [input]

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

1
vote
1answer
38 views

Getting exact time of button/key input

Is there a way to get the time of an input event (a key or button press) to a higher degree of accuracy than the Update call, maybe by subscribing to input events and handling them immediately?
0
votes
1answer
12 views

Input.GetAxis Vertical - Unity - can i force it to zero upon certain circumstances/event?

I am trying to make my own tetris clone. I have actually got very far into it without running into major problems, but I am now stuck and can't find the answer after searching. Basically I have used ...
0
votes
1answer
19 views

Remove or change graphic of InputField target graphic

I am working on a game in Unity and I have to use an InputField but I would like it to not have a border. Currently it has a black border with a border radius that needs to go. Through my initial ...
-1
votes
2answers
183 views

Sebastian Lague's A* star pathfinding “On condition”

As the title suggests I have been following the wonderful series of tutorials dealing with pathfinding made by Sebastian Lague. My problem is that the code is meant to be working immediately after ...
0
votes
1answer
31 views

How to code a game that can interact with custom controllers?

I want to have my work featured in alt.ctrl.gdc someday. The process of building a bizarre custom controller is a question for a different stackexchange site, but Can you tell me a way how to take ...
0
votes
1answer
24 views

Using InputListener touchDown - Unable to jump while pressing direction button

Using InputListener attached to images for touchscreen control I initially had the problem of the player being able to continuously jump and fix themselves to the ...
0
votes
1answer
18 views

How can I get sensor data on iPhone onto a Windows PC? For use as a steering wheel

I am making a Unity game. I want to be able to allow the phone to be used as a steering wheel, as input into the PC game. Technically, How can I achieve this? Can this be done through bluetooth? ...
1
vote
0answers
99 views

How can I use Cross Platform Input in Unity 2019?

I am trying to use CrossPlatformInput in Unity 2019 to follow this tutorial to use it on iOS: https://www.youtube.com/watch?v=Auj1mrsfXDE However, I have no item in the top bar for "Mobile View" ...
0
votes
1answer
28 views

libgdx: input handling issue

Not sure how to describe the issue I'm facing here: Rectangles are grouped and attached to a "layer" extending Stage. Each layer is added to a multiplexer in a Screen extension. There are 2 layers: ...
0
votes
1answer
58 views

Inputs in realtime multiplayer game

I'm using a structure, where client sends his inputs every 20ms in one packet and server parses his inputs every update(20ms aswell). I've got a problem, since player can send me more than one inputs ...
0
votes
1answer
173 views

How to setup input for local multiplayer without split-screen in Unreal Engine 4

To bind actions and axes in the character blueprint class, I may have multiple such character instances for each new APlayerController. Merely 1 Action Name (e.g. avoiding ...
1
vote
0answers
32 views

How to make only-head rotation in UE4?

I've made a character, attached a camera to it and setted input. But now i want only character's head to rotate with mouse, but not a whole character (player capsule rotates with Q and E keys). I ...
0
votes
1answer
43 views

Object jumping when it shouldn't - Input.GetAxis and booelans used - no raycasting - Unity

UDPATE2: I solved my jumping problem without using Input.GetAxis. The final code is at bottom. It's very simple. It uses rigidBody.transform.position with a boolean. UPDATE: Well, despite the good ...
0
votes
0answers
27 views

SDL_WarpMouseGlobal does not work in game

I tried to use SDL to move mouse in game. The function works fine only in menu, when I join a game, the function does not work. I checked coordinates with ...
0
votes
1answer
42 views

Transform inputs don't work

I'm writing a C# player script for a class and when I run, the sound inputs work fine, but the movement inputs don't respond, and I don't know how to fix it. Code: ...
2
votes
1answer
107 views

How to detect when the mouse is over a particular enemy collider, without falsely selecting bullet colliders?

I have an enemy shooting around. My game mechanic involves hovering over the enemy with the mouse to drain its health. While the enemy is moving, you need to follow it with your mouse. If you don't ...
0
votes
0answers
82 views

ImGui: disable window move with drag event on image

I'm displaying an image with ImGUI like this: ...
0
votes
1answer
40 views

unity input controls

so im going through the roll a ball tutorial for unity and ive gotten though setting up all the controls to allow my ball character to move around the space ive built. but the tutorial says nothing ...
0
votes
0answers
335 views

Unity: Nintendo Switch Pro Controller Joystick

I have a simple question that I've been researching for days. When I connect my Nintendo Switch Pro Controller to my (Mac) computer via bluetooth and use it for Unity input, everything works except ...
0
votes
0answers
63 views

How can I prevent movement from analog joystick “bounce”?

I'm working on a top-down game where the player can move up/down/left/right. The sprite changes to the corresponding direction, and I have an internal value that tracks the direction the player is ...
3
votes
1answer
149 views

SDL2 mouse motion event keeps occuring

The code I'm using is like so: ...
2
votes
1answer
52 views

Using single Triggers on multiple controllers in Unity

After trying out a lot of stuff I finally need to surrender. Im having a project where I want to use the triggers of the Xbox Controllers seperately. To do so I added them as axis 9 and 10 in the ...
0
votes
1answer
158 views

Custom mobile keyboard in unity

I'm trying to create a falling word typing game like z-type. I have used the code provided here — but it's is only for keyboards: ...
0
votes
0answers
106 views

How can i manage input in a split-screen multiplayer game?

In non-online multiplayer games, you most often see a "Press A to join" screen. I'm currently trying to figure out how it would be possible to create such a system, that selects the player via ...
1
vote
0answers
40 views

Support multiple gamepad layouts (Unity 2017.3)

My game supports touchscreen, keyboard + mouse and the Xbox One controller and the input so far works properly. Now I also want to add a second layout for the gamepad the player can then pick in the ...
0
votes
0answers
10 views

Android/iOs app: How to get input touch on different zones of an image ?

I'm trying to build my first app/game using Unity 3d. I've added an image and i just want to intercept an event when user touch different zones of the image. How can i do that ? Thanks
0
votes
1answer
23 views

InputListener not working on a custom Actor

Right now I am working on a UI for my game. I'm adding my own UI elements to a group and adding that to a stage. But the listeners I'm adding to the actors are not firing off at all. I have looked on ...
1
vote
2answers
89 views

How can I add left and right movement to my sprite without reducing forward movement?

I've made a character sprite that moves left and right when I press A and D, and moves forward automatically. However, whenever the character moves left or right, the forward movement is greatly ...
1
vote
1answer
82 views

How do I calculate a new position from current and target position for intuitive non-instant dragging?

I have a simple 2D game where I can move an object using the mouse. I've been improving on the 'feel' of the movement gradually, however it still doesn't behave as you'd expect if the object were to ...
3
votes
2answers
170 views

What verb describes when you hold a joystick to the right or left?

I'm trying to describe a the scenario where you use a joystick to turn the camera. However, I'm struggling to find the word for this. Saying the joystick is "pressed" could mean the joystick is ...
2
votes
1answer
90 views

Unity and arduino processing

This question relates to this link: https://www.freetronics.com.au/blogs/news/6537043-experimenting-with-unity-processing-and-arduino#.W2-SFs4zbIU Does anyone have any idea how I would begin doing ...
1
vote
1answer
400 views

Vibration/Rumble with PS4 Pad and LPDIRECTINPUTDEVICE8

I actually try to make my PS4 Pad rumble. I get the pad capabilities with ...
0
votes
0answers
79 views

How do games have low tick rates without causing input lag?

For example, Minecraft. It updates the gamestate at a rate of only 20/second. And from what I've read, these multiplayer games do the same with their network communication, sending updates at that ...
3
votes
1answer
88 views

How to identify individual keyboard keys across devices from different locales

I'm trying to make a UI system that adapts images for key binding depending on the keyboard type (azerty/qwerty/etc). For the moment I've done the binding with DirectInput Key Codes so it does not ...
0
votes
1answer
149 views

Unity 2D Tap to shoot at mouse position on android device

Hello everyone i am really stuck at the moment and would appreciate any help if possible. I have my game where i move the player up and down with 2 buttons on the bottom left of screenshot. I also ...
0
votes
0answers
37 views

Handling “nested” user actions in client/server card game

I'm developing a card game in JavaScript in a functional programming style and I'm unsure what is the best way to implement the flow of player actions that require other player actions for their ...
0
votes
1answer
52 views

How to Subscribe to Events from Unity's VRInput Script

I am new to Unity and trying to modify the Unity tutorial Interactive 360 Sample. I want to be able to call a function when a user swipes using an Oculus Go Controller. I noticed that the VRInput ...
1
vote
1answer
280 views

libgdx ashley how to detect clickEvent on Entity

How can I detect a click event on an Entity? I use libgdx with Ashley. Must I implement it by my self e.g. in touch down method of InputProcessor test if any entity is on this click position. Or exist ...
1
vote
2answers
95 views

Why does my gameobject fly of into the air when the screen is touched?

I am encountering a peculiar problem when updating a piece of code that translates my gameobject left and right based on mobile touch input. To provide context, the platform upon which the gameobject,...
2
votes
0answers
132 views

Pre-Hash Input Strings in Unity

So with the new Animator system, Unity has smartly allowed us to pre-hash the strings for looking up variables within the Animator state machine, using the Animator.StringToHash static method. This ...
1
vote
0answers
503 views

Distinguish between HTC Vive controller grip buttons in Unity

In Unity, I can check for grip button presses via the SteamVR API like so: if(controller.GetPressDown(SteamVR_Controller.ButtonMask.Grip)) { ... } This results ...
0
votes
1answer
256 views

Unity. Input in function for UI button OnClick

I am trying to create multiple selections for some items on my UI. To perform multiple selections of items I want a user to hold left control button. But then I add ...
0
votes
2answers
78 views

How to set up a key press to start the game

I've tried to create a simple start menu for my game which informs the player to press a key to start the game but the problem is that it works only if the key is pressed all the time...i'm not sure ...
0
votes
2answers
367 views

Is Pushdown Automata better for user input than Hierarchical State Machine?

I saw an example of code using HSM for user input, but to me it seems that Pushdown Automata would be a better fit. I'm confused. If I'm right, then after Hierarchical State Machine exits a ...
0
votes
1answer
49 views
0
votes
1answer
117 views

RawInput — Getting the system default mouse and keyboard

I'm using RawInput for device management, in a project that I have been working on for some time. It works great, really, but... After some hardware changes on my development system, including the ...
0
votes
1answer
34 views

Can I used a NES USB controller with XInput?

I'm doing a project to graduate from my game design degree and I have to recreate two levels from MegaMan(1987). I saw that there are usb nes controllers out there that are used for emulators on PC. ...
1
vote
1answer
31 views

Unity method/framework for handling different input modes

I'm a very new Unity developer who's looking for a best practice or framework for handling different input modes. I'm working in C#. Here's a contrived example: ...
1
vote
0answers
124 views

GLFW shift key not behvaing like other keys

I am using GLFW 3.2.1 Currently I am implementing a camera. For the vertical controls I am using space to go up and shift to go down. For all other keys, pressing the key results in the section of ...
0
votes
1answer
98 views

Why does the object not move correctly when I press the right mouse button?

2D Game in UNITY C# I have an object BULLET . After pressing the left mouse on my object (BULLET), the script allows me to rotate object according to the mouse's direction, in four directions : -...