For questions about joysticks.
Questions tagged [joystick]
496 questions
-1
votes
1 answer
Why do I get this error for a joystick in Unity?
I'm currently making a 2D game as a beginner and I wanted to add joystick controls to my game. I made everything like in the youtube video of Brackeys, but I always get this error:
NullReferenceException: Object reference not set to an instance of…

JonathanXD12
- 39
- 1
- 7
-1
votes
1 answer
Using joystick module with Arduino in Unity
I just made a game which a cube is moving on a platform without colliding any obstacles. I am trying to control the movement with a joystick module with an Arduino UNO. There is not any compilation errors and it runs well. After completing one…

PJacouF
- 19
- 8
-1
votes
1 answer
Call a setState of a statefull widget from the stateless widget
I have a stateless widget class that has a widget whose movements need to be tracked. I cannot keep this widget inside the stateful widgets as I don't want the state of this widget to be refreshed.
I have the following code.
import…

MOHAMMED NUMAN
- 183
- 12
-1
votes
2 answers
Joystick with switch control for Arduino Uno R3 will not display switch push
I am trying to get my code to show a switch input from a joystick on an Arduino Uno.
When I view it on the serial monitor, I see the x and y axis being displayed when I move the joystick.
When I click it I do not get anything to show up. I have the…

BoatingPuppy
- 31
- 1
- 5
-1
votes
2 answers
How to detect which joystick pressed button?
In Unity InputManager (Edit -> Project Settings -> Input) I can define and name different inputs. I have an event called "Draw" that happens when joystick button 0 is pressed. This seems to be working. However, I cannot tell which controller pressed…

Antti_M
- 904
- 10
- 20
-1
votes
1 answer
Need Help regading Unity CN Controls Joystick
I am learning unity 2D Games though video tutorials. The video tutorial I am following has used the older version of "CN Controls Joystick" (https://www.assetstore.unity3d.com/en/#!/content/15233).
Current version of "CN Controls Joystick" is…

D. Joe
- 13
- 2
-1
votes
1 answer
joystick event in java
I have a java application containing one text-field and I'm using a joystick.
How can I do something in the text-field when a button on the joystick is pressed?
/*
* To change this license header, choose License Headers in Project Properties.
* To…

Ahmed Salah
- 1
- 3
-1
votes
1 answer
Unity single joystick prefab
I would like to controll movement and rotation ans cant seem to find an answer. Im working with 3.4 Unity

user1686824
- 1
- 1
- 1
-2
votes
0 answers
Do a function when releasing the mobile/virtual joystick and button
I want to do a function when I release the virtual joystick or a UI image. Imagine like a mobile top-down game where you aim from a joystick and can shoot when you release the joystick.
I can't imagine how to do this any help is highly appreciated

Max
- 1
-2
votes
1 answer
Cocos2d Joystick
I have been looking all over for help on how to make a CCSprite move and rotate with the movement of a virtual joystick. I have tried examples and sample code, but, none have worked for me. If someone could tell me how to implement a joystick into…

skiboi38
- 1
-2
votes
1 answer
How can I create a "virtual joystick" based on GCController?
I'm building a framework to simplify the reuse of the GameController framework in game projects. When I had to think about unit tests, I realized that I can't emulate the joystick events, any ideas to help me?

Anderson Santos Gusmão
- 138
- 9
-3
votes
1 answer
DirectInput Compile Error (C++)
I'm using Jon Parise's DirectInput wrapper (sorry, lost the URL and can't find it) and am having a problem compiling it.
I am using this wrapper to take in input from 3 separate joystick devices and processing the data.
Here is the .cpp that is…

P_B
- 94
- 6
-3
votes
1 answer
How to make camera rotate through a virtual joystick ? I am trying to use the mobile single stick control
i am trying to create a game with two virtual joysticks.The first to control the player movement and the other to control the camera attached to the player.I want it to be a joystick movement mapped to the camara's rotation.How do I go about it ?…

Saranya Ananthakrishnan
- 91
- 2
- 14
-4
votes
1 answer
Understanding the logic behind the code for controlling an 8x8 dot matrix with a joystick
I found this code online for controlling a max7219 8x8 matrix with an Arduino, and I am struggling to understand a few things about the code. Here is the whole code:
#include
int UD = 0;
int LR = 0; //Setting up…

Crispy Bagpipes
- 7
- 1
- 6
-4
votes
1 answer
Issue with my game Joystick
I'm working in a spaceship first person view game. I have a joystick, and when i move the joystick i can move all the objects (asteroids) of the screen simulating that the spaceship is being moved with the joystick.
The game works fine, but now i…

NullPointerException
- 36,107
- 79
- 222
- 382