Accessibility: Rotate controller +90° (grips point left)

Rotate controller 90 degrees clockwise and play for potential accessibility uses. Credit goes to Brannon Zahand for his YouTube video displaying this method as an access possibility.
Version1.00
AuthorSpecialEffect
Publish DateTue, 25 Oct 2016 - 16:57
Last UpdateTue, 25 Oct 2016 - 16:57
Downloads24
RATE


0

0

Code: Select all
// ROTATE 90DEG CLOCKWISE - GRIPS POINT LEFT
// B.ELLIS 10-2016
 
// JOYSTICK SENSITIVITY ADJUSTMENT (FOR A VERY SENSITIVE THUMB-STICK, TRY SENSITIVITY = 327, MIDPOINT = 25, JOY_DEADZONE = 35)
define SENSITIVITY = 100; // SENSITIVITY (327 MAX - COMMON MAX FOR XBOX = 150).
define MID_POINT = 50; // INPUT MIDPOINT IS (set low for weaker input, 50 for default - 70 COMMON MAX FOR XBOX).
 
define JOY_DEADZONE = 20; // 20 (SMALLEST) -99 (LARGEST) TO ADJUST DEADZONE
define TWEAK = 20; // will add to JOY-DEADZONE - normally useful for one-stick steering
define JOY_BUTTONS_DEADZONE = 80; // JOYSTICK ACTING AS BUTTONS - NEEDS A BIGGER DEADZONE TO AVOID ACCIDENTAL PRESSES
define Z_DEADZONE = 5; // TRIGGERS
define LSTICK_MAX = 100; // ANALOGUE CONTROLS MAXIMUM OUPUT (0-100%)
define RSTICK_MAX = 100;
define TRIGGERS_MAX = 100;
 
define RESTRICTED = 0;          // 1 = OFF   1 = BLOCK MENU BUTTON
define EXTRA_RESTRICTIONS = 0// 1 = OFF   1 = BLOCK BACK/SELECT/SHARE/START/OPTIONS
 
 
main {
 
// SET SENSITIVITY
deadzone(PS3_LX, PS3_LY, DZ_CIRCLE, 0); sensitivity (PS3_LX, MID_POINT, SENSITIVITY);sensitivity (PS3_LY, MID_POINT, SENSITIVITY);
deadzone(PS3_RX, PS3_RY, DZ_CIRCLE, 0); sensitivity (PS3_RX, MID_POINT, SENSITIVITY);sensitivity (PS3_RY, MID_POINT, SENSITIVITY);
 
 
        swap(XB1_LS, XB1_RS); // REMAPPING
        swap(PS3_LX, PS3_RY); swap(PS3_LY, PS3_RX); // REMAPPING
 
        if(get_val(PS3_LX) > JOY_DEADZONE) {set_val(PS3_LX, get_val(PS3_LX)*-1);} else {set_val(PS3_LX, get_val(PS3_LX)*-1);} // LX INVERTED
        if(get_val(PS3_RX) > JOY_DEADZONE) {set_val(PS3_RX, get_val(PS3_RX)*-1);} else {set_val(PS3_RX, get_val(PS3_RX)*-1);} // RX INVERTED
 
        if(get_val(PS3_LY) > JOY_DEADZONE) {set_val(PS3_LY, get_val(PS3_LY));} else {set_val(PS3_LY, get_val(PS3_LY));} // LY INVERTED
        if(get_val(PS3_RY) > JOY_DEADZONE) {set_val(PS3_RY, get_val(PS3_RY));} else {set_val(PS3_RY, get_val(PS3_RY));} // RY INVERTED
 
        if(get_val(PS3_SELECT) > 0 && EXTRA_RESTRICTIONS) { set_val(PS3_SELECT, 0); }
        if(get_val(PS3_START) > 0 && EXTRA_RESTRICTIONS) { set_val(PS3_START, 0); }
 
 
        if(get_val(PS3_LX) <= JOY_DEADZONE && get_val(PS3_LX) >= JOY_DEADZONE*-1) set_val(PS3_LX,0); // DEAD-ZONE FILTER
        if(get_val(PS3_LY) <= JOY_DEADZONE && get_val(PS3_LY) >= JOY_DEADZONE*-1) set_val(PS3_LY,0);
        if(get_val(PS3_L2) <= Z_DEADZONE && get_val(PS3_L2) >= Z_DEADZONE*-1) set_val(PS3_L2,0);
 
        if(get_val(PS3_RX) <= JOY_DEADZONE && get_val(PS3_RX) >= JOY_DEADZONE*-1) set_val(PS3_RX,0); // DEAD-ZONE FILTER R-STICK
        if(get_val(PS3_RY) <= JOY_DEADZONE && get_val(PS3_RY) >= JOY_DEADZONE*-1) set_val(PS3_RY,0);
        if(get_val(PS3_R2) <= Z_DEADZONE && get_val(PS3_R2) >= Z_DEADZONE*-1) set_val(PS3_R2,0);
 
        if(get_val(PS3_LX) >= LSTICK_MAX) {set_val(PS3_LX, LSTICK_MAX);} // MAXIMUM STRENGTH LIMITER
        if(get_val(PS3_LX) <= -LSTICK_MAX) {set_val(PS3_LX, -LSTICK_MAX);}
        if(get_val(PS3_LY) >= LSTICK_MAX) {set_val(PS3_LY, LSTICK_MAX);}
        if(get_val(PS3_LY) <= -LSTICK_MAX) {set_val(PS3_LY, -LSTICK_MAX);}
 
}