Skip to main content

Questions tagged [control]

Translation of user input (via mouse, keyboard, gamepad, touchpad or other hardware interface) into in-game actions

Filter by
Sorted by
Tagged with
0 votes
0 answers
31 views

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: ...
CheckerT's user avatar
  • 176
1 vote
2 answers
279 views

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 ...
Valtsuh's user avatar
  • 139
0 votes
2 answers
93 views

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 ...
Thomas Klingler's user avatar
0 votes
0 answers
550 views

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 ...
Steven's user avatar
  • 965
1 vote
0 answers
52 views

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 ...
tigrou's user avatar
  • 3,279
2 votes
2 answers
645 views

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 ...
pocketlint60's user avatar
4 votes
1 answer
105 views

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 ...
Ken's user avatar
  • 6,136
0 votes
0 answers
1k views

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....
vampsz's user avatar
  • 15
0 votes
1 answer
172 views

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 ...
rat's user avatar
  • 3
0 votes
0 answers
275 views

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 ...
Timothy Moore's user avatar
0 votes
1 answer
251 views

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, ...
Raguel's user avatar
  • 103
0 votes
1 answer
84 views

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 ...
FSic's user avatar
  • 188
1 vote
0 answers
64 views

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 ...
worldsmithhelper's user avatar
0 votes
0 answers
41 views

I have this script that I made for an FPS character. public class Player_Movement : MonoBehaviour { public CharacterController controller; public Transform camera; ...
KI.'s user avatar
  • 472
1 vote
1 answer
771 views

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 ...
Progs's user avatar
  • 95
-1 votes
1 answer
2k views

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 ...
Brandon's user avatar
0 votes
1 answer
700 views

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 ...
1234567890's user avatar
0 votes
1 answer
1k views

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 ...
Loé B.'s user avatar
  • 35
1 vote
0 answers
242 views

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 ...
Remy Limelight's user avatar
0 votes
0 answers
96 views

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 ...
Mike's user avatar
  • 153
0 votes
1 answer
1k views

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 ...
SidS's user avatar
  • 171
5 votes
2 answers
323 views

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 ...
Alex's user avatar
  • 383
18 votes
5 answers
7k views

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. ...
Cannabijoy's user avatar
3 votes
1 answer
2k views

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 ...
Kennichi Nitta's user avatar
1 vote
0 answers
101 views

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 ...
Sheldon Wang's user avatar
1 vote
2 answers
1k views

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 ...
Mr Salsa's user avatar
1 vote
1 answer
543 views

I inherited from btCollisionWorld::ContactResultCallback but I really have no idea how to use this virtual function: ...
djofriend's user avatar
1 vote
2 answers
5k views

I am working on an Air Hockey game; I tried making the movement physics-based, by doing this: ...
user avatar
0 votes
2 answers
1k views

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 ...
Bram's user avatar
  • 3,744
-1 votes
1 answer
388 views

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 ...
DeeMastah's user avatar
1 vote
0 answers
99 views

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 ...
dude's user avatar
  • 141
2 votes
1 answer
4k views

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 ...
Vyrd's user avatar
  • 21
1 vote
1 answer
305 views

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 ...
user avatar
2 votes
1 answer
165 views

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 ...
Gavin's user avatar
  • 23
0 votes
1 answer
2k views

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 ...
shanji97's user avatar
  • 302
2 votes
1 answer
631 views

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 ...
Grimelios's user avatar
  • 589
1 vote
1 answer
70 views

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 ...
Eric Nelson's user avatar
2 votes
1 answer
5k views

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 ...
Nutty's user avatar
  • 129
1 vote
0 answers
108 views

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 ...
Matías González's user avatar
2 votes
1 answer
102 views

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, ...
user3658408's user avatar
0 votes
1 answer
105 views

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 ...
Epsiloncool's user avatar
2 votes
1 answer
807 views

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, ...
Okinawa Terminal's user avatar
1 vote
1 answer
132 views

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" ...
J. Price's user avatar
0 votes
2 answers
153 views

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 ...
nova nanite's user avatar
1 vote
1 answer
747 views

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 ...
user1509674's user avatar
2 votes
1 answer
310 views

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 ...
Ceiling Gecko's user avatar
1 vote
1 answer
401 views

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 ...
Aj Jones SlimSpydey's user avatar
0 votes
1 answer
286 views

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 ...
FrontEnd's user avatar
  • 1,789
-2 votes
1 answer
114 views

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 ...
sketcherskt's user avatar
0 votes
2 answers
6k views

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" ...
sketcherskt's user avatar