diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-04-07 10:23:45 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-04-07 10:23:45 +0400 |
commit | 885fa49aa4cd49a552bfe6210e3cb4701c4a5d04 (patch) | |
tree | a92028138d51c136190dceaaaf600a58246c823c /source/gameengine/Converter | |
parent | 816a9f3acb47f97d5bf92ae7ae8803e31f4a9f0a (diff) |
BGE Joystick Sensor
- Raised limit of 2 axis to 4 axis pairs (4==8 joysticks axis pairs)
- Added a new Joystick Sensor type "Single Axis", so you can detect horizontal or vertical movement, rather then just Up/Down/Left/Right
- added Python attribute "axisSingle" so you can get the value from the selected axis (rather then getting it out of the axis list)
- renamed Py attribute "axisPosition" to "axisValues" (was never in a release)
If we need to increase the axis limit again just change JOYAXIS_MAX and the button limits.
Diffstat (limited to 'source/gameengine/Converter')
-rw-r--r-- | source/gameengine/Converter/KX_ConvertSensors.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/gameengine/Converter/KX_ConvertSensors.cpp b/source/gameengine/Converter/KX_ConvertSensors.cpp index c9b51807767..64cfc101751 100644 --- a/source/gameengine/Converter/KX_ConvertSensors.cpp +++ b/source/gameengine/Converter/KX_ConvertSensors.cpp @@ -708,6 +708,11 @@ void BL_ConvertSensors(struct Object* blenderobject, hatf = bjoy->hatf; joysticktype = SCA_JoystickSensor::KX_JOYSENSORMODE_HAT; break; + case SENS_JOY_AXIS_SINGLE: + axis = bjoy->axis_single; + prec = bjoy->precision; + joysticktype = SCA_JoystickSensor::KX_JOYSENSORMODE_AXIS_SINGLE; + break; default: printf("Error: bad case statement\n"); break; |