Hello Guest

Joystick Non-Zero at Start

  • 1 Replies

Offline AGP

  • **
  • 51
Joystick Non-Zero at Start
« on: February 04, 2012, 19: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?


Offline Endolf

  • ***
  • 101
    • http://www.computerbooth.com/
Re: Joystick Non-Zero at Start
« Reply #1 on: February 06, 2012, 09: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.