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
2answers
96 views

Parsing “pick up” action in a text-based RPG

I’m coding a text-based RPG and I have my controls working: I have a string checking what you write in against an array of if statements. It can get it right with ...
0
votes
2answers
21 views

unity: input event consumed by image raycast target that is “under” a sprite with a 2D collider

I am having a hard time getting my UI to work. Basically I have a canvas with a UI image A that is the size of the screen. This image has raycast enabled and if effectively receiving inputs. Not in ...
-1
votes
0answers
52 views

Using two push buttons as an input to Unity from arduino

noob here So I am trying to use two push buttons from an Arduino Uno to move a character in Unity. Both buttons have to be pushed down for the character to move. Right now I have gotten the code to ...
1
vote
1answer
64 views

Implementing a more reliable upwards slash?

I am working on a 2D action platformer and I am currently implementing an upwards slash. For a normal horizontal slash, the player must press the attack button. For an upwards slash, the player must ...
0
votes
2answers
39 views

FPS-like mouse-look camera WinAPI problem

I have a problem with implementing mouse-look camera movement, like in FPS games. For me common solution is: Process WM_MOUSEMOVE event in ...
0
votes
1answer
34 views

Unreal MouseWheelAxis negative axis does not work

Would like to avoid using separate action mappings i.e. MouseWheelUp and MouseWheelDown for a system I'm developing. I noticed <...
0
votes
0answers
18 views

Delta Pointer Speed Unity New Input System

I'm using Unity's New Input System preview package 1.0.0 in Unity 2019.2.8f1. I have a working player controller script working with an InputActionAsset that uses <...
0
votes
2answers
76 views

Tab between input fields

I am new to working with Unity3d, I need to navigate between several inputField, for this I have looked at the solution that is in: tab-between-input-fields, but ...
0
votes
1answer
93 views

How do I make the player gun stop firing when sprinting

I am trying to get the players gun to fire when the player is walking and the stop firing when the player starts to sprint. The gun will work just fine and ire when the player is walking, but it will ...
0
votes
2answers
109 views

Extending control remapping script to work with mouse buttons

I have created a default key map for my game, however I have also included an option in the settings where the player can change the key bindings. My issue is if the player clicks on the button for ...
1
vote
1answer
34 views

What is a proper way to handle player inputs based on different states?

So, I have two ideas how to do that: Use enum to define current state and check current state value before running certain method group in Update. Code: ...
0
votes
3answers
277 views

Unity UI - Value of text input (assigned with OnChange event) is always “one letter behind”

I am having a problem in unity setting up a search field. I will post pictures down reggarding my problem but first let me quickly explain what is going on. I have input element in my ui and i have ...
0
votes
2answers
54 views

Unity Custom InputManger for Cross-Platform Input

I have been working on my game for quite a while. one of its key features is cross-platform local multiplayer for example 2 players on 1 keyboard and some people on the controller. here is the 4th ...
0
votes
0answers
37 views

Game input display is slow

I'm trying to build a very small example to run input logic but i'm facing a small issue. The code below is runnable with MonoGame v3.7.0.1708. My problem is that whenever you press a key (here the ...
0
votes
0answers
17 views

Error calling a Action Map

I tried calling the event Set Destination, simply to make an impression on the game screen: I did not succeed. I modified the 3 options displayed on the right (consume input / execute when paused / ...
0
votes
2answers
55 views

Problem with action mapping

Summarizing my problem well, I need a single button (right mouse button) to do two things. In my project (TopDown) I defined that instead of the left mouse button, the character moves with the right ...
0
votes
1answer
77 views

Mouse drag rotation script doesn't work when attached to OBJ model

I am new to Unity. I imported an OBJ model and assigned materials to it. I want to rotate it using the mouse in the game, using this script: ...
0
votes
0answers
35 views

3D player movement with Unity's new input system

So, I trying to get used to the new Unity input system. "Back in the days" I just got the Vertical/Horizontal axis, put them into a Vector3, multiplied them by a certain value and then moves the ...
1
vote
1answer
56 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
36 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
38 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
258 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
33 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
36 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
21 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
1answer
280 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
37 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
157 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
400 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
36 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
52 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
34 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
43 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
224 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
122 views

ImGui: disable window move with drag event on image

I'm displaying an image with ImGUI like this: ...
0
votes
1answer
46 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
602 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
167 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
241 views

SDL2 mouse motion event keeps occuring

The code I'm using is like so: ...
2
votes
1answer
89 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
248 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
211 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
42 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
1answer
26 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
111 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
101 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
180 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
104 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 ...
0
votes
1answer
93 views

How can I detect whether a point is moving in a circle?

I want to detect if my GameObject (Vector3 Point) being dragged by the player's finger is moving in a circular fashion. I thought I could save the last 5 points ...
1
vote
1answer
486 views

Vibration/Rumble with PS4 Pad and LPDIRECTINPUTDEVICE8

I actually try to make my PS4 Pad rumble. I get the pad capabilities with ...