Stack Exchange Network

Stack Exchange network consists of 174 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).

0
votes
0answers
6 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
0answers
26 views

Key presses are not responding well

The key presses are responding once, then doing the automatic key presses. The code is below and you can see what it does below that. ...
0
votes
1answer
33 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
31 views

Unity3D: Can I simulate input so that input.GetKeyDown event evaluates to True, without physically pressing a key?

I am aware that I can use User32.dll hooks or the InputSimulator, etc. However, I am wondering: does Unity3D provide a way to pass a key (eg space) to the input ...
0
votes
0answers
24 views

Using Socket.io for player input handling, is it better to send input as a parameter or have multiple input handlers?

I am building a multiplayer game using a Node.js server with Socket.io for gameplay communication. While developing player input, I wondered: Would it be more efficient if I had one event handler ...
0
votes
0answers
19 views

How to reconcile idle ticks for multi-player client side prediction?

I am building a 3D 3rd person real-time action MMO. I am in the process of instrumenting client-side prediction and server reconciliation. I have authoritative game state snapshots being sent ...
0
votes
0answers
20 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
34 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
27 views

Is there a way to get SDL to handle more than four gamepads?

My end goal is to have 8 controllers in SDL. I have four Xbox360 controllers and four third party PS3 controllers (with a switch between XInput DirectInput on the back) Windows 10 recognizes 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
0answers
26 views

Fast Input device switch

We want to build a game framework on top of unity. ( Framework to enable fast game creation of Type X in Unity ) Our current goal is to support the "on-the-fly" switch between input devices like most ...
0
votes
0answers
22 views

Show keyboard only on OnMouseUp / after finger leaves InputField, not on touch or OnMouseDown

I have an InputField in my game that displays an on-screen keyboard when a touch or mouse pointer presses it. Instead, I want to show the keyboard only after the touch leaves the screen or on ...
0
votes
1answer
10 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
56 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
54 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
163 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
83 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
176 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
60 views

Why isn't this data being passed on?

I've made an Input class with a method which returns a boolean array of a total of 1024 keys. This array is then passed on as an argument of the Update() function of every GameObject-inherited class ...
0
votes
0answers
59 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
61 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
95 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
32 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
26 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 ...
0
votes
1answer
125 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
59 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
1answer
71 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
241 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
92 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
70 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
170 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
45 views
0
votes
1answer
70 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
27 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. ...
0
votes
0answers
19 views

LibGdx TouchScreen Movement Logic with Box2D

I'm trying to implement some touch screen controllers to my game and i'm having a few issues :( i don't really understand what's the right way to do it, i can't figure out how to press simultaneously ...
1
vote
1answer
27 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: ...
0
votes
0answers
55 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
0answers
30 views

How do I use vrtk or playmaker input actions with oculus touch?

I have the latest versions of unity/playmaker/vrtk and I am using the oculus cv1 with touch controllers. I have placed FSMs on the controllers and I am trying to use any of the different input actions ...
0
votes
1answer
97 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 : -...
3
votes
1answer
120 views

How can I simplify my state machine transitions?

I currently have the following base class which I inherit from for my player states (e.g. Idle, Walking, Jumping). ...
2
votes
1answer
126 views

Offset input sent to blend tree based on Character's Local Rotation

I am developing a top down twin stick shooter. I am running into a issue where if I change my character's rotation, the Unity Blend Tree animation does not play the correct animation that corresponds ...
0
votes
0answers
16 views

Problem with Mouse function not replicating properly

I'm working on multiplayer shooter, and i made a separate mouse control function for my custom mechanics. But there's a problem, mouse only rotate camera on client 1, but client 2 can't see that ...
0
votes
1answer
65 views

Handling User Input Based on the Current Game State

currently i'm developing a 2D game in my spare time and i'm confused on how to handle the input from the player. Currently my game uses the state design pattern, each game state is a different object ...
0
votes
2answers
70 views

Implementing Customizable Input

I am trying to brainstorm how to create customizable input. Any help would be greatly appreciated, but here's my best guess so far. I could create a custom 'Input' class, with Methods to call for ...
-1
votes
1answer
97 views

Unity: input axis raw for touch returning fractions

I am not going to show any script, which may make it complicated. In unity ,when I used the cross platform input manager for touch buttons, the raw axis values returned are in small fractions(like 0....
1
vote
0answers
277 views

pygame KEYUP KEYDOWN events only once per frame?

I've been playing around with pygame, and I ran into a bit of an odd issue with input on the pygame event queue. Consider the following test code: ...
1
vote
0answers
52 views

Simulating continuous input delay in Unity 5.6?

I posted this question on Unity Answers a while ago but got no response, so I'm posting it here now. I'm developing a 2D action game in which there are two different characters on-screen, and the ...
0
votes
0answers
24 views

c# putting tags selection start-end reasonable

In Unity UI InputField, I can fetch the start point of selection of the text input and end point. And since InputField supports Rich Text Format, we can add bold (< b >) tags to start and end ...
0
votes
1answer
36 views

Java Swing KeyBindings do not recognize input in a weird way

I am new to programming, so forgive me if I make silly mistakes. I want to make a game, and I started by making the player, and that's where I'm stuck at. I'm trying to use Keybindings (InputMap and ...
0
votes
1answer
43 views

In Unity (2017) is there a way to set the buttons used by Input.GetAxis() programatically?

The buttons used for keyboard axis inputs can be set manually via Negative and Positive Button fields for the axis at Edit > Project Settings > Input Manager. However I'd like to make this a user ...