JoystickSensor(Sensor)
base classes — bpy_struct, Sensor
- class bpy.types.JoystickSensor(Sensor)
Sensor to detect joystick events
- axis_direction
The direction of the stick
- Type:
enum in [
'RIGHTAXIS','UPAXIS','LEFTAXIS','DOWNAXIS'], default"'RIGHTAXIS'"
- axis_number
Which Stick to use
- Type:
enum in [
'LEFT_STICK','RIGHT_STICK'], default"'LEFT_STICK'"
- axis_threshold
Threshold minimum to detect the stick/trigger
- Type:
int in [0, 32768], default 0
- axis_trigger_number
Which trigger to detect
- Type:
enum in [
'LEFT_SHOULDER_TRIGGER','RIGHT_SHOULDER_TRIGGER'], default"'LEFT_SHOULDER_TRIGGER'"
- button_number
Which button to use
- Type:
enum in [
'BUTTON_A','BUTTON_B','BUTTON_X','BUTTON_Y','BUTTON_BACK','BUTTON_GUIDE','BUTTON_START','BUTTON_STICK_LEFT','BUTTON_STICK_RIGHT','BUTTON_SHOULDER_LEFT','BUTTON_SHOULDER_RIGHT','BUTTON_DPAD_UP','BUTTON_DPAD_DOWN','BUTTON_DPAD_LEFT','BUTTON_DPAD_RIGHT'], default"'BUTTON_A'"
- event_type
The type of event this joystick sensor is triggered on
- Type:
enum in [
'STICK_DIRECTIONS','STICK_AXIS','SHOULDER_TRIGGERS','BUTTONS'], default"'BUTTONS'"
- joystick_index
Which joystick to use
- Type:
int in [0, 7], default 0
- single_axis_number
Which stick single axis (vertical/horizontal/other) to detect
- Type:
enum in [
'LEFT_STICK_HORIZONTAL','LEFT_STICK_VERTICAL','RIGHT_STICK_HORIZONTAL','RIGHT_STICK_VERTICAL'], default"'LEFT_STICK_HORIZONTAL'"
- use_all_events
Triggered by all events on this joystick’s current type (axis/button)
- Type:
boolean, default False
- classmethod bl_rna_get_subclass(id, default=None, /)
- Parameters:
id (str) – The RNA type identifier.
- Returns:
The RNA type or default when not found.
- Return type:
bpy.types.Structsubclass
- classmethod bl_rna_get_subclass_py(id, default=None, /)
- Parameters:
id (str) – The RNA type identifier.
- Returns:
The class or default when not found.
- Return type:
type