LWJGL
June 18, 2013, 13:56:33 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL 2.9.0 released!
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: Joystick Non-Zero at Start  (Read 577 times)
AGP
Newbie
*
Posts: 41


« on: February 04, 2012, 11:00:58 »

I've posted this years before: whatever analog joystick I may use (I've tested on several), it always has non-zero values for all the axis at runtime. This is a very big issue because it means that every game I write is screwy at first. But the second I use the analog sticks the the axis input functions intuitively. Is there no way to write a Controller.resetAxisValues() method that would clear these initial false values?
Logged
Endolf
Talks Too Much
***
Posts: 101



WWW
« Reply #1 on: February 06, 2012, 01:10:05 »

LWJGL gets it's joystick values from jinput, jinput gets them from the OS, we can't just reset the values to zero, how would that work with non centred axis?, the best way is to use the event system from jinput, this means your application only gets an axis value when it changes, this means you'll never get the values that the OS initially provides.

Endolf
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!