Click or drag to resize

DualSenseExtension Methods

The DualSenseExtension type exposes the following members.

Methods
  NameDescription
Public methodGetAccelerometerValue
Gets the value from the accelerometer and processes it so that 1G = 1.0 and so that coordinates match Unity coordinate system. The value returned could be thought of as a gravity vector and user acceleration combined. If using this value to apply a force in the direction of the vector, invert each axis first. This value represents the last value reported by the accelerometer.
Public methodGetAccelerometerValueRaw
Gets the raw value from the accelerometer as reported by the device. Reported device coordinates do not match Unity's coordinate system. Format: 1G = 8192f This value represents the last value reported by the accelerometer.
Public methodGetGyroscopeValue
Gets the value from the gyroscope processed into Unity's coordinate system, adjusted for sensitivity, and accumulated over time since the last update. This value is not fused with the accelerometer value and can drift.
Public methodGetGyroscopeValueRaw
Gets the raw value from the gyroscope as reported by the device accumulated over time since the last update. Reported device coordinates do not match Unity's coordinate system. This value is not fused with the accelerometer value and can drift.
Public methodGetLastGyroscopeValue
Gets the last value from the gyroscope processed into Unity's coordinate system and adjusted for sensitivity. The sensor can return more than one value per frame. This represents only the last measurement recorded, not an accumulated value. This value is not fused with the accelerometer value and can drift.
Public methodGetLastGyroscopeValueRaw
Gets the last raw value from the gyroscope as reported by the device. Reported device coordinates do not match Unity's coordinate system. The sensor can return more than one value per frame. This represents only the last measurement recorded, not an accumulated value. This value is not fused with the accelerometer value and can drift.
Public methodGetLightColor
Gets the current light color.
Public methodGetOrientation
Gets the orientation of the controller in Unity coordinates. This is only an estimate because accelerometer + gyroscope is not accurate enough to perfectly determine orientation at all angles. Drift can occur on the world Y axis over time. The orientation can be reset by calling ResetOrientation(). Note: Orientation is not very reliable when connected via Bluetooth due to the possibility of dropped gyro data.
Public methodGetTouchId
Gets the touch id for the touch at the specified index.
Public methodGetTouchPosition
Gets the touch position for a particular index normalized to a 0 - 1 range. (Left = 0, Bottom = 0)
Public methodGetTouchPositionAbsolute
Gets the touch position for a particular index in absolute units as returned by the device. (Left = 0, Bottom = 0)
Public methodGetTouchPositionAbsoluteByTouchId
Gets the touch position for a particular touch id in absolute units as returned by the device. (Left = 0, Bottom = 0)
Public methodGetTouchPositionByTouchId
Gets the touch position for a particular touch id normalized to a 0 - 1 range. (Left = 0, Bottom = 0)
Public methodGetTriggerEffectStates
Gets the current trigger effect states.
Public methodGetVibration(Int32)
Gets vibration level for a motor at a specified index.
Public methodGetVibration(DualShock4MotorType)
Gets vibration level for a specific motor.
Public methodGetVibrationMode
Gets the vibration mode for the gamepad.
Public methodIsTouching
Determines if the current touch id is valid for any currently active touch.
Public methodIsTouchingByTouchId
Determines if the current touch id is valid for any currently active touch.
Public methodResetOrientation
Resets the orientation to zero state. (Controller laying on back with buttons facing up and the top edge of the controller facing the screen.)
Public methodSetLightColor(Color)
Sets the light color. Alpha can be used to set intensity.
Public methodSetLightColor(Single, Single, Single)
Sets the light color.
Public methodSetLightColor(Single, Single, Single, Single)
Sets the light color.
Public methodSetTriggerEffect
Sets a trigger effect.
Public methodSetVibration(Int32, Single)
Sets vibration level for a motor at a specified index.
Public methodSetVibration(Single, Single)
Sets vibration level for left and right motors.
Public methodSetVibration(DualShock4MotorType, Single)
Sets vibration leves on an individual motor.
Public methodSetVibration(Int32, Single, Boolean)
Sets vibration level for a motor at a specified index.
Public methodSetVibration(Int32, Single, Single)
Sets vibration level for a motor at a specified index with a timeout.
Public methodSetVibration(DualShock4MotorType, Single, Boolean)
Sets vibration level on an individual motor.
Public methodSetVibration(DualShock4MotorType, Single, Single)
Sets vibration leves on an individual motor.
Public methodSetVibration(Int32, Single, Single, Boolean)
Sets vibration level for a motor at a specified index with a timeout.
Public methodSetVibration(Single, Single, Single, Single)
Sets vibration level for left and right motors.
Public methodSetVibration(DualShock4MotorType, Single, Single, Boolean)
Sets vibration level on an individual motor.
Public methodSetVibrationMode
Sets the vibration mode for the gamepad.
Public methodStopVibration
Stops vibration on all motors.
Top
See Also