Questions tagged [control]
Translation of user input (via mouse, keyboard, gamepad, touchpad or other hardware interface) into in-game actions
115 questions
0
votes
0
answers
31
views
Mobile Input for android build
I want to make buttons for a mobile build, testing with android 11. To set variables, which I read in other scripts, I use the following code:
...
1
vote
2
answers
279
views
2D Zoom to mouse point
So I'm trying to create a zoom function for my 2D camera.
The best result I've got so far is:
But something still feels off, and I just can't seem to pinpoint it.
My code currently, which simply ...
0
votes
2
answers
93
views
How to capture a signed displacement using an analog trigger?
The details of my particular problem are a bit convoluted, but take this similar scenario:
I want the player to be able to control the velocity of the character in some direction using only an analog ...
0
votes
0
answers
550
views
When did the Z - X buttons became standard?
I like platformers and I usually play them on a keyboard.
For a while in the early 2010s, there wasn't quite a standard between my platforming keyboard controls. and my settings varied between a ...
1
vote
0
answers
52
views
How to efficiently move a unit to a given 2D target position using tank controls?
I am looking for a simple algorithm that can move a unit as fast as possible to a given target position. The unit can only move using the "tank controls": it can turn in both directions and ...
2
votes
2
answers
645
views
Get and change hold durations of an InputActionAsset's bindings through script
I have an input action in my project that is performed after being held for a length of time. By default it begins after 0.2 seconds, but I'm trying to add a slider to increase or decrease it in my ...
4
votes
1
answer
105
views
What does "Continuity of response" mean in the book "Game Feel"
In Steve Swink's book "Game Feel", he talks about 3 thresholds the computer must meet in order to maintain the illusion of real-time control.
The impression of motion (display above 10 ...
0
votes
0
answers
1k
views
Control sound volume in Java
I'm trying to control the volume of a file with keyinput. But all I get is a null error:
Exception in thread "AWT-EventQueue-0" java.lang....
0
votes
1
answer
172
views
All kinds of 2key controls
I want to find all possible ways to control a game using 2 keys on input.
1. Summarize the problem
I find a brand new game engine that has only two inputs but great potential! And the community of ...
0
votes
0
answers
275
views
How to add mouse aim to flight script
I am making a flight combat game and I want to add mouse aim to control to the flight script I am using. Is there any way I can add mouse aim to my script similar to Warthunder's mouse aim. Mainly ...
0
votes
1
answer
251
views
How can I implement an aiming system like the Tank Stars mobile game?
I have been trying to implement the same aiming system as in Tank Stars, but I got a little stuck. I implemented simple stick aiming, which basically aims towards the stick movement.
In Tank Stars, ...
0
votes
1
answer
84
views
Multipurpose buttons
As in the title, I am trying to figure out how to use a button for multiple purposes in Unity.
In my specific case for instance, I am currently using the joystick button 0 (the A button) to perform a ...
1
vote
0
answers
64
views
User input scheme of 2d vector field on a 2d plane for navigation
I want to create a strategy game based on distributions of "units" which can be moved around and attack each other.
By distribution of units i mean that i don't have any discrete units ...
0
votes
0
answers
41
views
Script not working (Function not changing value)
I have this script that I made for an FPS character.
public class Player_Movement : MonoBehaviour
{
public CharacterController controller;
public Transform camera;
...
1
vote
1
answer
771
views
Godot 3.X Implementing a smooth movement for pitch, yaw & roll
I'm implementing pitch, yaw and roll on airplane object, but when rotating the object (either pitch, roll or yaw), it starts rotating slowly but then the rotating movement goes awfully fast very ...
-1
votes
1
answer
2k
views
How can I get the speed of finger drag using unity TouchPhase.Moved?
I'm making a mobile game where you control a 3d ball by touch. So far I can get it to roll based on finger down and drag (via TouchPhase.Moved) but I want to be able to detect a fast flick or finger ...
0
votes
1
answer
700
views
How can I get the basic Unity player controller to move based on a gameobjects rotation?
I am making a basic movement script based off of the built in playercontroller in Unity. I am trying to get the Player gameobject to move forward based on its own rotation (i.e. if it is rotated to 90 ...
0
votes
1
answer
1k
views
MonoGame/Xna gamepad inputs and joystick
I've been around xna game development since very recently, and I'm actually developing a sort of Library for my games. But then I want to make an enemy with default Player settings for keys layouts ...
1
vote
0
answers
242
views
Unity wall jump issue
I've got a very annoying problem that I have been stuck on for a few days and I can't figure it out.
It is for a wall jump.
I basically want my wall jump to have a bit of force away from to wall to ...
0
votes
0
answers
96
views
Correct way to control a scene
I'm trying to build an '90s style rpg game, think dragon warrior series, where it will have a UI box at the bottom of the screen where the user makes a choice like attack, move, eat etc
I'm thinking ...
0
votes
1
answer
1k
views
How to Bring the Scene View Camera Controls into Game View
I've got a scene with a big sphere in the centre (the Earth) and a lot of smaller spheres around (the stars).
Above is a screengrab in Scene View with the camera in the Front View position.
I really ...
5
votes
2
answers
323
views
Designing mouse-aimed aircraft controls
I am attempting to design mouse-aimed turning to control an aircraft in a 3D environment. To cut it short, you aim where you want to go, and the aircraft turns to face that direction (similar to War ...
18
votes
5
answers
7k
views
How to address players struggling with simple controls?
I have an HTML game I built with Phaser 3, and I can't decide what to do with the controls. I've changed them several times, and now I feel like I've hit a sweet spot between usability and fun. ...
3
votes
1
answer
2k
views
How to control jump strength by how long the player presses the jump button?
In a platformer game I am working on, I want my character to have controlled jumps. If I simply tap the jump key it will jump a just a little or if I hold it for a time it will jump higher.
What do I ...
1
vote
0
answers
101
views
How can I solve the jerky images when camera positions were calculated and sent from another computer?
I'm working on a simulator project. Computer A which uses a stick as a controller to produce operation data and calculate simulate data which will be sent to computer B as camera positions to render ...
1
vote
2
answers
1k
views
Access a clone of an instantiated object - not all the clones?
I am trying to access the object I instantiate - basically a prefab car instantiates cars (one after one) ..the problem that when try to move one .. they all move together ... what's the best way to ...
1
vote
1
answer
543
views
Detect collision with bullet physics, to make a character controller
I inherited from btCollisionWorld::ContactResultCallback but I really have no idea how to use this virtual function:
...
1
vote
2
answers
5k
views
How could I make the player's movement more responsive?
I am working on an Air Hockey game;
I tried making the movement physics-based, by doing this:
...
0
votes
2
answers
1k
views
Aiming in a twin stick shooter
I am trying to implement a twin stick shooter game, sometimes referred to as dual stick shooter where the left stick controls movement, and the right stick aims a gun.
What I do now, is directly map ...
-1
votes
1
answer
388
views
How to do drag controls?
I wanted to control my character with dragging controls (horizontally only) I currently have a code that controls the character with touching the left and right screen. I wanted the same controls as ...
1
vote
0
answers
99
views
Why is my control scheme is not casual enough? [closed]
I am building a game like counter strike but 2dimensional and for android, it is already in beta phase. I have already share it with my friends and classmates to play it. Almost all of them said the ...
2
votes
1
answer
4k
views
How can I remap Unreal's Editor default movement (WASD) keys for a non-QWERTY keyboard
I am using a French (AZERTY) keyboard, and as such my "usual" game movment keys are ZQSD instead of WASD. I have been trying to change Unreal Editor's default keys to those I am accustomed to but I ...
1
vote
1
answer
305
views
Special moves using mouse movement?
Recently, I accidently broke my PC controller and I was forced to play Skullgirls using the keyboard. Needless to say, it sucked. Fighting games are the kind of games where a controller is (almost ...
2
votes
1
answer
165
views
Implementing modular game control with JSON/etc. config file?
I'm having trouble wrapping my head around a method to compartmentalize my game control scheme within the game loop in an efficient way. Currently this is basically how my control works in bad ...
0
votes
1
answer
2k
views
How to swap between two player objects in Unity?
I have two object for the player. Whenever I press space I'd like to swap between them and also I would like to change the first player main camera to the second player camera and equally for the ...
2
votes
1
answer
631
views
How can I process extra mouse buttons using Monogame?
I use Monogame for game development. For processing mouse input, I can use the Mouse class to query basic information like left click state, right click state, and ...
1
vote
1
answer
70
views
What is the best option to implement buttons as player controls?
I am familiar with programming, but new to Unity. There seems to be a million ways to implement a right and left button for turning the plane. I'm wondering what the standard/easiest/best way to do ...
2
votes
1
answer
5k
views
Unity's CharacterController vs. Rigidbody with Collider
With a few friends I started to make a 3D game in the style of the old platformers à la Super Mario 64 / Spyro / Banjo Kazooie.
So now we are thinking about the controls and how to do them.
There ...
1
vote
0
answers
108
views
Unity and Apple TV Remote control sensitivity
I'm developing a game for Apple TV and I'm responding to the swipe gesture using
if (Input.GetKeyUp(KeyCode.Joystick1Button4)){
DoSomething();
}
But the ...
2
votes
1
answer
102
views
How can I stop certain keys from being prioritized in a 2D platformer?
I am currently working on a 2D platformer in Monogame. I have implemented WASD and arrow keys control, but because of the ordering of the if statements, the D key is always executed last if down, ...
0
votes
1
answer
105
views
Double touch joysticks
I am developing a mobile game where I need to control main character in any direction using touch analog joystick (https://pineight.com/mw/images/6/6f/Ipoc_dpad.png). It's ok but I also want my ...
2
votes
1
answer
807
views
Handling multiple controllers in a single player game
Currently implementing input support for a single player game and I'm unsure how best to handle the (admittedly odd) situation where the user plugs in 2 or more controllers. Should only one be active, ...
1
vote
1
answer
132
views
Using a Windows forms Textbox control in an XNA game
What I want to do is this: Use a standard Textbox control in an XNA game. This will be the only control used, and the game is designed in xna alone. I (for some reason) cannot get the game to "see" ...
0
votes
2
answers
153
views
How To Have My Character Turn When The Camera View Moves
So I have recently finished animating my character, having it move with key presses and have applied a camera to it. But I am stumped on how to have the player turn when the camera view moves, and ...
1
vote
1
answer
747
views
2D Driving Game with Unity
I'm trying to make a 2D car driving game in Unity and I'm having problems with my code.
I am able to move forward,backward,turn left/right using arrow key from my present code
...
2
votes
1
answer
310
views
How to stop diagonally in an event driven input system?
Example scenario:
Assume 2 dimensional top down movement system.
Given that I have 4 directional keys ( UP / DOWN / LEFT / RIGHT ), I am able to move in 8 different directions 4 perpendicular and 4 ...
1
vote
1
answer
401
views
Interactive Controls (switches, knobs, buttons) in Unity [closed]
I'm working on a puzzle aspect of a game, and wanted to make a section where players relay information to one another, and have to input the correct values.
At its most basic, its a few stored ...
0
votes
1
answer
286
views
How to map changing stances (southpaw/orthodox) to gamepad controls?
I am developing a third person hack n slash style game which features a variety of melee and projectile weapons as well as unarmed combat. The player will be able to dual wield any combination of the ...
-2
votes
1
answer
114
views
How to make my "first person controller" continue to turn left or right when key is pressed in Unity 5?
I recently posted this How To Make My First Person Controller turn left and right in unity 5
but now I'm having a slight problem when I press the key that turns my camera it only does it for a little ...
0
votes
2
answers
6k
views
How To Make My First Person Controller turn left and right in unity 5
I want my first person controller to turn left and right instead of just moving straight on that axis.
i have a 3d environment setup in "unity 5" and i am working with the "first person controller" ...