Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Axis 3 on joystick (http://www.chiefdelphi.com/forums/showthread.php?t=74398)

camper365 13-02-2009 22:15

Axis 3 on joystick
 
I am trying to use the dial on the bottom of the joystick, and I know that it's Axis 3. The problem is that the bottom of the dial (all the way down) is -1 and the top is 1. I want to make the bottom 0 and the top 1. Is there any way I can do that.
I have tried Absolute Value, but that makes the bottom 1 and the top 1 (the middle 0). Is there a way to recalibrate the axis in the code?

TotalChaos 13-02-2009 22:22

Re: Axis 3 on joystick
 
You could simply add 1 to the output and then divide that value by 2.

- Austin

camper365 13-02-2009 22:24

Re: Axis 3 on joystick
 
that's all I need. I knew it wsa something simple, but I couldn't think of it right then (what I really hate is when that happens on my math test)

TotalChaos 13-02-2009 22:49

Re: Axis 3 on joystick
 
Quote:

Originally Posted by camper365 (Post 820339)
(what I really hate is when that happens on my math test)

Haha I'm with you there. :P ... That happens way more often then I'd like..

- Austin


All times are GMT -5. The time now is 02:26.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi