Oh, okay. ----- Original Message ----- From: Neale Roberts Sent: Saturday, December 08, 2001 6:17 AM To: [EMAIL PROTECTED] Subject: Re: [hlcoders] Joystick Fun It works just like an ordinary joystick axis though, except it's not sprung to return to centre. ----- Original Message ----- Sent: Saturday, December 08, 2001 10:03 AM Subject: Re: [hlcoders] Joystick Fun
Not quite. The dial controls speed in the case of flight sim. If you push it forward you go fast, if you push it back you go slower. Pretty straight forward. ----- Original Message ----- From: Reedbeta Sent: Friday, December 07, 2001 11:49 PM Subject: Re: [hlcoders] Joystick Fun If I remember correctly in your original description you described this dial thingy as being capable of modifying the range of the joystick itself? IE, set the dial at one end and you get fine control and at the other end you get coarse control? If so, the mechanism is probably built into the joystick itself and you don't need to do a thing to have it work in HL...it will show up in the stick position values automatically.
--- Nathan Taylor <[EMAIL PROTECTED]> wrote: > Thank you, thank you. > > So for that dial thingy I should probably just search the msdn for the > reference code I assume? > > Lakario > > ----- Original Message ----- > From: botman > Sent: Friday, December 07, 2001 12:11 PM > To: [EMAIL PROTECTED] > Subject: Re: [hlcoders] Joystick Fun > > > Okay, i think you may have mis-understood (or maybe me). I need to code > on that > > dial somehow and I don't know where to start since the data input style is > different > > than a key. > > > > -Lak > > Look through the code. The joystick code (IN_ReadJoystick) uses joyGetPosEx > (see the MSDN info for details) to read the joystick position. This will be > from -32768 to 32767 for the X and Y axis. The IN_JoyMove() function > translates this joystick position into pitch angles and sideways movement. > > Just change the IN_JoyMove() function to take the X axis values and use > those for roll and take the Y axis values and use those for pitch (i.e. rip > out the code that's in there and replace it with your own). > > There are 2 #defines near the top of the file that determine whether the > joystick works using absolute positions or relative positions... > > #define JOY_ABSOLUTE_AXIS 0x00000000 // control like a joystick > #define JOY_RELATIVE_AXIS 0x00000010 // control like a mouse, spinner, > trackball > > You might want roll to be absolute (the plane keeps rolling more and more > when you hold the stick to the left or right) and use relative movement for > the pitch (the plane would pitch up or down based on joystick position but > wouldn't keep pitching more and more if the stick was held all the way at > the top or bottom). > > Jeffrey "botman" Broome > > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, please > visit: > http://list.valvesoftware.com/mailman/listinfo/hlcodersGet more from the Web. > FREE MSN Explorer download : http://explorer.msn.com >
__________________________________________________ Do You Yahoo!? Send your FREE holiday greetings online! http://greetings.yahoo.com _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com
Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com
|