Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (797)
Games in Android Showcase (234)
games submitted by our members
Games in WIP (864)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Jinput Analog X, Y, Z Axis input noise  (Read 401 times)
0 Members and 1 Guest are viewing this topic.
Offline pavul

Senior Devvie


Medals: 4
Exp: 4 years



« Posted 2019-07-29 04:10:39 »

Hello, 2 days ago i implemented JInput and mapped all buttons, DPAD and different AXIS, but i am having issues with Analogic AXIS, for example: when i move the stick on Y AXIS i am also having events on X AXIS, so when i try to move the player on Y AXIS is moved as well on X AXIS because of that.

what is the best approach to prevent this?, i am using Jinput 2.0.9 btw, horseman obviously.

its better not know why it works, that know why is not working
Offline FabulousFellini
« Reply #1 - Posted 2019-07-30 15:43:36 »

I used JInput for Dodger Dog.   I'm at work now, but I can send you the code for it when I get home later.  Whatever i did works really well, but I cant really remember how I did it.

-FabulousFellini
www.fabulousfellini.com
Offline pavul

Senior Devvie


Medals: 4
Exp: 4 years



« Reply #2 - Posted 2019-07-30 20:56:16 »

sure, thanks, that can work, I could make it work with DPAD and buttons, but I haven't make the analogic work yet.

its better not know why it works, that know why is not working
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline FabulousFellini
« Reply #3 - Posted 2019-07-31 18:27:20 »

Woah dude I totally forgot, then took a weekend trip.   I'll PM you later tonight if you still need it.  I know the analog sticks work like a percentage though, if that helps.  But I also think it depends on the controller.  For instance the triggers.   Playstation triggers are used like a button, either on or off, where as XBox triggers are used with a percentage.  The analog sticks no matter what controller I believe are all based on being in between -1 and 1, where 0 is not doing anything with it, but I'll make sure and PM you later (for real this time lol).

-FabulousFellini
www.fabulousfellini.com
Offline pavul

Senior Devvie


Medals: 4
Exp: 4 years



« Reply #4 - Posted 2019-07-31 18:36:50 »

no problem, on PS4 triggers act like button but at the same time as analogic input, I've tested Xbox one and PS4 controllers, however where I have the issue is with the threshold but I kinda could fix this all values between -0.35 to 0.35 will be ignored, however when the X AXIS or Y AXIS are 1 or -1 the process is stopped, I mean when I reach those values I can't get more events from jinput, dunno if that is normal, gonna make more testing on it today, thank you.

its better not know why it works, that know why is not working
Pages: [1]
  ignore  |  Print  
 
 

 
hadezbladez (3628 views)
2018-11-16 13:46:03

hadezbladez (1294 views)
2018-11-16 13:41:33

hadezbladez (3634 views)
2018-11-16 13:35:35

hadezbladez (697 views)
2018-11-16 13:32:03

EgonOlsen (4000 views)
2018-06-10 19:43:48

EgonOlsen (4528 views)
2018-06-10 19:43:44

EgonOlsen (2688 views)
2018-06-10 19:43:20

DesertCoockie (3548 views)
2018-05-13 18:23:11

nelsongames (3701 views)
2018-04-24 18:15:36

nelsongames (4726 views)
2018-04-24 18:14:32
Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!