2022 Developer Survey is open! Take survey.
7 votes

Button mapping of an Xbox 360 controller for windows

Below is a helpful image guide, provided by the Unify Community Wiki article on the Xbox 360 controller. Make sure you use Axis The triggers are represented as axis, as opposed to buttons. This is ...
user avatar
  • 5,176
6 votes
Accepted

How can I use imprecise accelerometer data for controls?

I don't know if it is because of a poor component that causes the false readings or a extremely precise component that registers the spinning of the earth, as it orbits the sun, as our solar system ...
user avatar
  • 1,196
6 votes
Accepted

Do I need Microsoft authorization to support Xbox 360 controllers for a pc game?

No, you do not need authorization from Microsoft to support Xbox 360 controllers. You can use the XInput API for free.
user avatar
4 votes

Handling XBox 360 Controller Connections in LibGDX after Game has Started

Read the wiki! Controllers connects/disconnects don't give listener events (right now), so controllers must be polled manually. The wiki says controller listeners don't work on the desktop for ...
user avatar
  • 191
4 votes
Accepted

USB NES controller

As others have explained, controllers (especially simple controllers like these) are supposed to work out of the box, with the standard input libraries of your operating system (DirectInput in Windows)...
user avatar
  • 13.2k
3 votes
Accepted

Handling multiple controllers in a single player game

TL;DR - Ideally you should allow all controllers to open up your game's options menu and select the "Primary" controller (which can be defaulted to the first controller you see). That controller is ...
user avatar
  • 660
3 votes
Accepted

How do I quantify the curvature of a touch swipe?

Detecting swipe curvature Treat the finger swipe as a polyline. Approximate its curvature, and use that as a multiplier for how much to “curl” the resulting shot either left or right. Let's say a ...
user avatar
  • 13.3k
3 votes
Accepted

Steelseries Stratus XL controller: Keycode for middle button

According to the FCC instruction filing for Stratus XL, the center round key is intended to be a home key. If that's correct, there might not be much you can do, as the developer reference for the ...
user avatar
  • 8,565
2 votes

In Unity for Android, how do I create touchable buttons?

Since Android devices don't have left/right buttons (well, a long time ago they used to, and if you use bluetooth keyboard/gamepads they will), what you want is onscreen buttons. If you search for ...
user avatar
  • 14.5k
2 votes
Accepted

How to create axes for a console controller

You can set up new axes for joysticks in the input manager by using "Joystick Axis" for the Type. The left stick would need two entries in the input manager, one horizontal (using the X axis), and one ...
user avatar
  • 1,461
2 votes
Accepted

Unity3D Joystick Buttons Xbox360 & PS3 have Inconsistent Button Inputs?

Yes, PS3 controllers are a different configuration than the Xbox controllers. XBox maps to XInput while PS3 is proprietary. If you treat Button 1 on all joysticks as the fire button, then yes it will ...
user avatar
  • 1,708
2 votes

Using Smartphone as a steering wheel on Linux

Check out node-virtual-gamepads. It does almost what you want (doesn't seem to have accelerometer support yet). From its blurb: This nodejs application provides the possibility to use your ...
user avatar
  • 14.5k
2 votes

How to support more than 4 XInput controllers?

Xinput library only supports 4 controllers at a time - please refer to the wiki page on Directinput -DirectInput Wiki. May take some work, but you could enumerate some of the controllers under Direct ...
user avatar
  • 1,100
1 vote

Character automatic movement and rotation

...
user avatar
1 vote

Animator get number of animations (Unity)

[SerializeField] Animator animator; int NumberOfNonEmptyStates = animator.runtimeAnimatorController.animationClips.Length; This returns the number of non-empty ...
user avatar
1 vote
Accepted

Crouching Up and Down XNA C# Controller

Try implementing a property to keep track of your previous pressed state. So then you can do something like this instead: ...
user avatar
  • 8,279
1 vote

How the game sends force feedback to the steering wheel

how to get from the game inside the type of force feedback This is a game design question. Once you know what feedback features are available for the controller in use, whether it is a game ...
user avatar
  • 15.4k
1 vote
Accepted

Coding a left/right object movement C# script for android phones in unity

Here we are just one script, assign it to the cube TargetSlideControl.cs ...
user avatar
  • 136
1 vote

Unity Controller to Make Reticle Orbit based on the right stick input

I figured it out. I was going about it all wrong. It's not perfect due to how unity handles analog sticks but here's the code. ...
user avatar
1 vote

How to make my "first person controller" continue to turn left or right when key is pressed in Unity 5?

Input.GetButton() instead of Input.GetButtonDown() The former checks to see if the key is currently down and outputs true for ...
user avatar
1 vote
Accepted

WiFi Game Controller Protocol

I would say there is no such standard, because there are no WiFi game controllers. All the wireless game controllers I checked use either Bluetooth or some proprietary wireless data transmission. ...
user avatar
  • 891
1 vote

Unity Controller navigating UI

Changing the EventSystem's following values: Input Actions Per Second: 2 Repeat Delay: 0.3 This makes it more responsive, but is not ideal because it involves changing the EventSystem present in ...
user avatar
  • 245
1 vote

Can't set up a PS3 controller in Unity

I had your same problem. In my case It got fixed by closing unity and reconnecting the PS3 controller before starting Unity again. Maybe it helps
user avatar
  • 11
1 vote

Can't set up a PS3 controller in Unity

The PS3 controller is not directly compatible with PC. You will need a driver and a program to translate the controls to the format used on a PC. If you search the net, most articles will refer to an ...
user avatar
  • 1,708
1 vote

Change players state and controls in-game

If your objects are not animated I'd make just a transform animation between first and the second. When you want to change the objects you just play the animation and stop at the end. If you want to ...
user avatar
  • 1,320
1 vote

What's the best way to train PID controllers?

Don't tune pids using the simplistic "trial and error" method! You will never get good results because parameters depend on each other. Use FOPDT (first order plus dead time) model together with IMC ...
user avatar
  • 111
1 vote

Unity provides wrong Input value if game is started with bumpers pressed down

I've found that using XInput.Net fixed the immediate problem for me. As what I need to do is fairly simple I think this is going to be a good solution.
user avatar
  • 277
1 vote

XNA: How to capture precise time of button press?

Rather than polling for events, where the only option for higher precision is to poll faster, you could try listening for the events directly. You can attach an event listener to the windows event ...
user avatar
  • 824
1 vote
Accepted

Make continuos movements with controllers in LibGDX

buttonDown() and other methods inControllerListener only fired when the key is pressed.If you want constant movement you need a ...
user avatar
1 vote
Accepted

Joystick control for camera only works when button pressed

You are literally getting the Joystick button state and only moving if it's pressed... if (controller.GetButtonDown (SixenseButtons.JOYSTICK)) { Just remove it. ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible