https://github.com/rafaelvaloto/windowsdualsenseunreal
Plugin with full support for the DualSense PS5 controller in Unreal Engine versions 5.3, 5.4, and 5.5 for Windows platforms. No configuration needed
https://github.com/rafaelvaloto/windowsdualsenseunreal
dualsense dualsense-pc-adaptive-triggers dualsense5 force-feedback haptic-feedback plugin ps5-controller ue5-plugin unreal-engine unreal-engine-5 windows-10 windows-11
Last synced: 2 months ago
JSON representation
Plugin with full support for the DualSense PS5 controller in Unreal Engine versions 5.3, 5.4, and 5.5 for Windows platforms. No configuration needed
- Host: GitHub
- URL: https://github.com/rafaelvaloto/windowsdualsenseunreal
- Owner: rafaelvaloto
- License: other
- Created: 2025-02-10T00:31:38.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2025-03-09T00:06:18.000Z (2 months ago)
- Last Synced: 2025-03-09T00:23:44.559Z (2 months ago)
- Topics: dualsense, dualsense-pc-adaptive-triggers, dualsense5, force-feedback, haptic-feedback, plugin, ps5-controller, ue5-plugin, unreal-engine, unreal-engine-5, windows-10, windows-11
- Language: C++
- Homepage:
- Size: 58.4 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Windows Dualsense for Unreal Engine version 5.3, 5.4 and 5.5
### **Plugin with full support for the DualSense PS5 controller in Unreal Engine versions 5.3, 5.4, and 5.5 for Windows platforms. No configuration needed**
### No necessary configuration to run the control.
## Supports settings of triggers, haptic feedback triggers, unreal native force feedback blueprint, vibrations, leds, battery level, gyroscope, accelerometer etc..
### Usage methods available via C++ or Blueprint.
```
#include "DualSenseProxy.h"void APlayerController::BeginPlay()
{
Super::BeginPlay();
int32 ControllerId = 0;
// It is necessary to change the value to false in PlayerController if HapticFeedback is to be used. SetDisableHaptics(true) is set by default.
SetDisableHaptics(false);// Reset buffer all values
UDualSenseProxy::ResetEffects(ControllerId);
// Gyroscope and Accelerometer are set to false by default. Calibration needs to be implemented
UDualSenseProxy::EnableAccelerometerValues(ControllerId, false);
UDualSenseProxy::EnableGyroscopeValues(ControllerId, false);// Touch pad values default false, values max 1.0f
UDualSenseProxy::EnableTouch1(ControllerId, false);
UDualSenseProxy::EnableTouch2(ControllerId, false);// Level battery Full load max 100.0f
float levelBattery = UDualSenseProxy::LevelBatteryDevice(ControllerId);// Leds configs
UDualSenseProxy::LedMicEffects(ControllerId, ELedMicEnum::MicOn);
UDualSenseProxy::LedPlayerEffects(ControllerId, ELedPlayerEnum::One, ELedBrightnessEnum::Medium);
UDualSenseProxy::LedColorEffects(ControllerId, FColor(255, 255, 255));// Vibrations example
PlayDynamicForceFeedback(0.5f, 3.f, true, true, true, true);
// Stop triggers effects
UDualSenseProxy::StopAllTriggersEffects(ControllerId);
UDualSenseProxy::StopTriggerEffect(ControllerId, EControllerHand::Left);
UDualSenseProxy::StopTriggerEffect(ControllerId, EControllerHand::Right);// Normalize triggers
UDualSenseProxy::EffectNoResitance(ControllerId, EControllerHand::Left);
UDualSenseProxy::EffectNoResitance(ControllerId, EControllerHand::Right);// Start position max value 8 | Force max value 9
UDualSenseProxy::EffectContinuousResitance(ControllerId, 5, 8, EControllerHand::Left);
UDualSenseProxy::EffectContinuousResitance(ControllerId, 1, 4, EControllerHand::Right);// Start and end positions max value 8
UDualSenseProxy::EffectSectionResitance(ControllerId, 1, 8, EControllerHand::Left);
UDualSenseProxy::EffectContinuousResitance(ControllerId, 5, 8, EControllerHand::Right);// Example Haptics Effects...
// Start position max value 8 | Forces max value 9
UDualSenseProxy::SetTriggerHapticFeedbackEffect(ControllerId, 8, 0, 0, 6, EControllerHand::Left, true);
UDualSenseProxy::SetTriggerHapticFeedbackEffect(ControllerId, 8, 0, 0, 7, EControllerHand::Right, true);// SetHapticsByValue is a method of PlayerController.
SetHapticsByValue(0.1f, 1.0f, EControllerHand::Left);
SetHapticsByValue(1.0f, 1.0f, EControllerHand::Right);
}```
### Usage via Blueprints


### Basic example to check connection, reconnect device, and apply LEDs to the DualSense.

### Haptic trigger feedback

# Installation
Download the compiled plugin **Windows x64**[UE 5.3 download plugin WindowsDualsense_ds5w1.0.0.zip](https://github.com/rafaelvaloto/WindowsDualsenseUnreal/blob/master/WindowsDualsense_ds5w_5.3/WindowsDualsense_ds5w1.0.0.zip)
[UE 5.4 download plugin WindowsDualsense_ds5w1.0.0.zip](https://github.com/rafaelvaloto/WindowsDualsenseUnreal/blob/master/WindowsDualsense_ds5w_5.4/WindowsDualsense_ds5w1.0.0.zip)
[UE 5.5 download plugin WindowsDualsense_ds5w1.0.0.zip](https://github.com/rafaelvaloto/WindowsDualsenseUnreal/blob/master/WindowsDualsense_ds5w_5.5/WindowsDualsense_ds5w1.0.0.zip)
Extract the file to
```C:\Program Files\Epic Games\UE_[version]\Engine\Plugins```
Now enable the plugin in the Unreal Editor, connect your DualSense device, and restart the editor.

After restarting the engine, the following message will appear in the bottom right corner:

### Native Gamepad Mapping in Unreal

### The keys for the Gyroscope and Accelerometer are as follows:

You don’t need to map the keys. By default, the plugin already maps the standard Gamepad layout.
> **NOTE:** Enable Gyroscope, Accelerometer, and Touch only after mapping the actions to avoid interfering with button press recognition, as Gyroscope, Accelerometer, and Touch constantly emit values.

> **NOTE:** It may be necessary to enable haptic feedback in the project settings, under **Edit > Project Settings > Input**.

### The plugin is compatible with Unreal's native Blueprints Force Feedback, for example:
Config

Result

## Contributions
Thanks to the [DualSense on Windows API](https://github.com/Ohjurot/DualSense-Windows) library, which facilitated the development of this plugin.