morad Posted March 16, 2012 Share Posted March 16, 2012 I'm working with the joystick demo for the Xbox 360 and it seems like all the stick commands are about angles: joystick.GamepadStickXY- gives a value from -32767 to + 32767 when down/up is 0 joystick.GamepadStickNormXY- same as the above but with values from -1 to 1 joystick.GamepadStickAngle - same thing from -pi to +pi joystick.GamepadStickDir - just up/down/left/right there is nothing about the stick input size? that way when your insert a precise down/up input you get no movement. something is missing. Quote Link to comment Share on other sites More sharing options...
diedir Posted March 16, 2012 Share Posted March 16, 2012 Hi morad this demo is not an exhaustive joystick demo, it is based on dxinput code which expose some functions that (imo) are sufficient for driving a joystick through lua code, now if you want more functions (don't know what means input size) you are free to put your own. Quote AMD Ryzen 5900HX - Nvidia RTX 3070 - 32 Go - 1To SSD - W11 Link to comment Share on other sites More sharing options...
morad Posted March 16, 2012 Author Share Posted March 16, 2012 HI diedir What i mean with input size is the amount of deviation from the center. I hope i could enter some more functions but i don't know how. Quote Link to comment Share on other sites More sharing options...
morad Posted March 16, 2012 Author Share Posted March 16, 2012 found the answer! the command needed is: joystick.GamepadStickLength It give the input size from 0 to 1 regardless of the stick direction Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.