Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / joystick z() short a value?

Author
Message
Mychal B
15
Years of Service
User Offline
Joined: 21st Jul 2010
Location: Coos bay, rainville
Posted: 9th Jan 2013 08:51
Hey guys,

All I'm doing is printing out the joystick z() value after dividing it by 100

"print joystick z()/100"

When I push the stick all the way to the left it says -9, but when I push it all the way to the right it says 10, which throws off my rotation speed. I was wondering if anyone else has this problem, or if it's something in the command.

If it is the command I can simply limit the right value to 9, but if its not the command it will screw it up for other controllers!

The fastfood zombie killer
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 9th Jan 2013 10:20
maybe explain exactly what you are trying to do, and which joystick?

X360 for Windows pad?

Mychal B
15
Years of Service
User Offline
Joined: 21st Jul 2010
Location: Coos bay, rainville
Posted: 9th Jan 2013 22:20
Im using a logitech controller, and im just using the z value to rotate the camera, however the left max value is -9 and the max right value is 10. This makes turning left slower than right

I simply made the max value if it is to the right 9 so that it is the same as being pushed to the left, but if it doesn't have these same different values on other controllers then it will be messed up again!

The fastfood zombie killer
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 9th Jan 2013 22:46
What does it print if you don't divide by 100? Like this:



TheComet

http://blankflankstudios.tumblr.com/
Quote: ""
- Randomness 128
Mychal B
15
Years of Service
User Offline
Joined: 21st Jul 2010
Location: Coos bay, rainville
Posted: 10th Jan 2013 03:42
when left is -993 and when right is 1000

The fastfood zombie killer
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 10th Jan 2013 03:44
Are you sure you are just not pulling it back hard enough?

Check the device properties for dead zones if any...

Mychal B
15
Years of Service
User Offline
Joined: 21st Jul 2010
Location: Coos bay, rainville
Posted: 10th Jan 2013 04:04
Im sure that the joystick is going as far as it can, and I don't have any deadzones on it :/

The fastfood zombie killer
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 10th Jan 2013 18:41 Edited at: 10th Jan 2013 18:42
Deadzones are in the centre of the joystick, not on the outside, so I don't know if that would fix it.

I have just tested 4 joypads (2x Logitech USB thingy, 1x Logitech F310, 1x Logitech F510) and they all range from -1000 to 1000 on all axises.

Do you have any other analog input device with which you can compare your joypad with? Also, are you using the newest version of DBP, U77?

TheComet

http://blankflankstudios.tumblr.com/
Quote: ""
- Randomness 128
Mychal B
15
Years of Service
User Offline
Joined: 21st Jul 2010
Location: Coos bay, rainville
Posted: 10th Jan 2013 22:22
I do not, but I'm glad to hear that it is just this controller. Have to get back to work, on break

The fastfood zombie killer

Login to post a reply

Server time is: 2026-07-07 09:05:08
Your offset time is: 2026-07-07 09:05:08