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
0answers
25 views

Using a Bluno beetle instead of Arduino Uno

So I am making an interactive game using Unity and an Arduino Uno. However, I now want to migrate my Arduino project onto a Bluno Beetle board. I am using the following code on Unity: ...
2
votes
1answer
34 views

Reducing noise from joystick at small deflections

I have placed in my level a cube, which is my player, and a camera, which will follow the player. I'm defining a direction A from camera to player and another B perpendicular to this one. So I get ...
0
votes
0answers
33 views

Simple message box in gdscript / godot

I want a single line of code which shows a popup dialog with the words "Hello World!" and an "Ok" button. (I want something simple for now, I know how to make something more complicated but that ...
0
votes
0answers
35 views

Player is not responding to arduino code in Unity

So I am developing this game (as part of a larger game), where the player has to collect all the coins before moving on to the next level. I want the player to when it receives a set number of button ...
0
votes
1answer
110 views

Unreal C++ Detecting new Key Down during current Key Hold

I am currently working on a combat system and I wanted to be able to have key combos to execute combat moves and such, and I am detecting key input type as well for example, if the key is tapped, or ...
0
votes
1answer
59 views

How to use TEnumAsByte Unreal 4.22

The problem I am attempting to use a TEnumAsByte in one of my class headers: I get compilation errors: Code sample I have included everything relevant to the ...
0
votes
2answers
136 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
55 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
vote
1answer
69 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
54 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
49 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
29 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
168 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
737 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
61 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
40 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
106 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
146 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
88 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
49 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
59 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
282 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
34 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
38 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
23 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
417 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
41 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
201 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
650 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
41 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
63 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
35 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
290 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
1answer
48 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
661 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
250 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
287 views

SDL2 mouse motion event keeps occuring

The code I'm using is like so: ...
2
votes
1answer
98 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
292 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: ...
1
vote
0answers
43 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
30 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
116 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
108 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
187 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 ...