Questions tagged [joystick]

For questions about joysticks.

496 questions
0
votes
1 answer

Move and rotate 2d object using virtual joystick

Here is my code for moving a 2D top-down object using the built in virtual joystick: void Update () { Vector2 moveVec = new Vector2(CrossPlatformInputManager.GetAxis("Horizontal"), …
Abdou023
  • 1,654
  • 2
  • 24
  • 45
0
votes
1 answer

Joystick control Java

I am building a robot simulator to simulate how the robot will move and react to friction and other outside events. I have it working using the arrow keys for input, but I am trying to get it working with a joystick. I am using slick2D per…
Raffi
  • 7
  • 3
0
votes
1 answer

Unity 5: How to know if finger is on joystick even if it is at horizontal & vertical zero

I'm creating a jetpack (mobile) controller where left joystick is used to control forward and backward movements and right joystick is used to control rotation and upward movements. What I want is player to go upwards whenever user is touching the…
Jonathan
  • 325
  • 2
  • 3
  • 24
0
votes
1 answer

Getting current android gamepad axis position

I receive axes position from my bluetooth gamepad controller in dispatchGenericMotionEvent(android.view. MotionEvent) method. My method: @Override public boolean dispatchGenericMotionEvent(final MotionEvent event) { if( mPadListener==null…
0
votes
1 answer

SlimDX Wrong Joystick State on startup

I use SlimDX and DirectInput to handle a XBox 360 Gamepad for Windows. Everything is working fine but I have the following problem: When a button is pressed while starting the application, the button state is NOT shown as pressed in the joystick…
Lumo
  • 627
  • 6
  • 21
0
votes
1 answer

Unity 3D - Problems with Mad Catz R.A.T. Pro X extra buttons

A few Days ago my loved PC Mouse, a Razer Death Adder, died because of a rage attack of my boyfriend. So I decided to get a new one from Mad Catz, because why not trying ... A few days later I got her, a very nice Mad Catz R.A.T. PRO X. I'm working…
0
votes
1 answer

SDL2 joystick event not triggering

So I've got this code: void Engine::Run() { // initialize all components if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK)) throw Exception("couldn't initialize SDL\n" + string(SDL_GetError()), 1); // other code run = true; …
0
votes
3 answers

for event in pygame.event.get(): pygame.error: video system not initialized when using ssh

Here is the code that I'm trying to run via ssh into my raspberry pi. It usually works fine when I have a keyboard and monitor connected directly to the raspberry pi, but it doesn't run when I am using ssh. import pygame, sys, time from…
Windell
  • 1
  • 2
0
votes
2 answers

Simulate a virtual joystick using accellerometer data

Reading acceleromenter data is quite easy on the Iphone but using them effectively to simulate a virtual joystick is a different story. I see that accelerometer data are quite noisy and the average module of each axis accelleration in a rest…
luca
  • 369
  • 1
  • 5
  • 7
0
votes
1 answer

How to jump character with using JoyStick in Mobile Touch Screen?

I want to jump and move my character at the same with using just one Joystick. Is there any idea? In my joystick; Left key will allow character to move left. Right key will allow character to move right. Up key will allow character to…
komtan
  • 81
  • 1
  • 12
0
votes
1 answer

How can I rotate player's arm with a joystick in 2D game?

In desktop version, my character's arm is rotates according to the movement of the mouse. I need the same thing in mobile version but this time I need a joystick to rotate his arm. How can I do that? //Here is my code, for rotating arm void…
komtan
  • 81
  • 1
  • 12
0
votes
1 answer

Contiki OS on Zolertia Z1 - Conflicting activation of phidget and battery sensors?

I build a small game controller for the Z1. I have a process reading values from a Joystick sensor. It works fine. Then, I added a second process, reading the value of the battery sensor every 5 minutes. But it makes the Joystick stop working: the…
foobar443
  • 2,339
  • 3
  • 23
  • 31
0
votes
1 answer

Monogame, C# - Using multiple input types for multiplayer game

I'm making a local multiplayer game. I need to be able to use both keyboard input (most likely only for player one) and other joystick controllers for the rest of the players. I cannot use PlayerIndex as most other games do as it is made for…
0
votes
1 answer

d-pad and joystick have the same Event-source id. want to differentiate between d-pad and joystick

i'm trying to differentiate between a joystick and a d-pad input. i always get the same Event source (16777232). it doesnt matter if i push the d-pad or the turn the joystick. i'm using a ipega gamecontroller my problem is: First: when I turn the…
Pau
  • 1
  • 3
0
votes
1 answer

Pygame joystick

I have a SPEEDLINK gamepad, and want to see the results of the movements in the gamepad. I wrote this: import pygame from pygame.locals import * import random pygame.init() TV=pygame.display.set_mode((500,500)) joystick_count =…
user4813927