-
Notifications
You must be signed in to change notification settings - Fork 12
๐ API Reference: USonyGamepadProxy
Proxy class for interacting with Sony gamepad devices such as DualSense or DualShock controllers. This class provides static methods to handle various functionalities, including device status, connection type, battery levels, LED effects, motion sensor calibration, touch capabilities, and deprecation of certain methods.
Checks if the DualSense or DualShock device with the specified Controller ID is connected.
Parameters
-
ControllerId(int32): The ID of the controller to check for connectivity.
Returns
-
bool:Trueif the DualSense or DualShock device is connected,falseotherwise.
Retrieves the type of the connected device (e.g., DualSense, DualSense Edge, or DualShock 4) based on the specified Controller ID.
Parameters
-
ControllerId(int32): The ID of the connected controller whose type is to be determined.
Returns
-
EDeviceType: The type of the device as an EDeviceType enum value. Possible values include:DualSenseDualSenseEdgeDualShock4
Retrieves the connection type of the DualSense or DualShock device with the specified Controller ID.
Parameters
-
ControllerId(int32): The ID of the controller whose connection type is being queried.
Returns
-
EDeviceConnection: The connection type of the device, which can beUSB,Bluetooth, orUnrecognized.
Retrieves the battery level of the DualSense or DualShock controller for the specified controller ID.
Parameters
-
ControllerId(int32): The ID of the DualSense or DualShock controller to query.
Returns
-
float: The battery level of the controller as a float. Returns0.0fif the library instance cannot be retrieved.
Updates the LED color effects on a DualSense or DualShock controller using the specified color.
Parameters
-
ControllerId(int32): The identifier of the controller whose LED color will be updated. -
Color(FColor): The color to set on the controller's LED. -
BrightnessTime(float): (DualShock 4) LED brightness transition time, in seconds. (min: 0.0, max: 2.5). Default is0.0f. -
ToogleTime(float): (DualShock 4) Toggle transition time, in seconds. (min: 0.0, max: 2.5). Default is0.0f.
Controls the LED and microphone visual effects on a DualSense controller.
Parameters
-
ControllerId(int32): The ID of the DualSense controller to be affected. -
Value(ELedMicEnum): The desired LED and microphone effect to apply.
Initiates the motion sensor calibration process for the specified controller. The calibration adjusts the motion sensor sensitivity and dead zone settings.
Parameters
-
ControllerId(int32): The ID of the controller to be calibrated. -
Duration(float): Calibration Duration (Seconds). The time in seconds to collect sensor data for calculating the stable center (baseline). Longer durations can provide a more accurate baseline. (min: 1.0, max: 10.0). Default is2.0f. -
DeadZone(float): Noise Deadzone Percentage. A percentage (0.0 to 1.0) of the sensor noise range to ignore after calibration. A higher value creates a larger deadzone, filtering out more residual noise but potentially ignoring very subtle movements. (min: 0.0, max: 1.0). Default is0.5f.
Retrieves the calibration status of the motion sensor for the specified controller.
Parameters
-
ControllerId(int32): The ID of the controller whose motion sensor calibration status is being queried. -
Progress(float&): A reference to a variable where the calibration progress will be stored, expressed as a percentage.
Returns
-
bool:Trueif the calibration process is in progress,falseotherwise.
Enables or disables the touch functionality on a specified DualSense controller.
Parameters
-
ControllerId(int32): The identifier of the controller for which the touch functionality should be enabled or disabled. -
bEnableTouch(bool): A boolean indicating whether to enable (true) or disable (false) the touch functionality.
Enables or disables the gyroscope functionality for a specified DualSense controller.
Parameters
-
ControllerId(int32): The ID of the controller for which the gyroscope functionality is to be modified. -
bEnableGyroscope(bool): Set totrueto enable the gyroscope, orfalseto disable it.
โ ๏ธ Deprecated: This method was refactored and deprecated as of plugin version v1.2.1. Please use the GamepadCoOp Plugin instead.
Remaps the specified gamepad ID to a new user and updates the old user's settings accordingly.
โ ๏ธ Deprecated: This method was refactored and deprecated as of plugin version v1.2.10. Please use the GamepadCoOp Plugin instead.
Attempts to reconnect a DualSense or DualShock controller based on the given controller ID.
โ ๏ธ Deprecated: This method was refactored and deprecated as of plugin version v1.2.10.
Disconnects the DualSense or DualShock device associated with the given Controller ID.
โ ๏ธ Deprecated: This method was refactored and deprecated as of plugin version v1.2.14. UseEnableGyroscopeValuesinstead.
Enables or disables accelerometer values for the specified controller.