I’m test driving Defold and while doing the “Walking Astronaut Tutorial” I decided to test my PS5 wireless controller. The controller works fine while plugged but not while using Bluetooth. I get the following message in the console:
WARNING:INPUT: No gamepad map found for gamepad 0 (DualSense Wireless Controller). The raw gamepad map will be used.
Keep in mind that I get the same error while the controller is plugged via USB C but at least it works.
How do I go about adding support for this controller?
I have tried doing a few things but none have worked yet. I tried copying another PS controller and renaming it to match the DualSense name but that didn’t work. I also tried running the utility that helps map controllers but it does not run under Monterey.
INFO:DLIB: Log server started on port 57623
INFO:ENGINE: Target listening with name: computername - 192.168.86.37 - Darwin
INFO:ENGINE: Engine service started on port 57624
INFO:ENGINE: Defold Engine 1.2.188 (6bfeea3)
INFO:ENGINE: Loading data from: build/default
INFO:ENGINE: Initialised sound device 'default'
WARNING:INPUT: No gamepad map found for gamepad 0 (DualSense Wireless Controller). The raw gamepad map will be used.
INFO:DLIB: SSDP: Started on address 192.168.0.18
INFO:DLIB: SSDP: Started on address 192.168.86.37
You need to add mappings for you gamepad. The simplest way to do so is using gdc tool
Then in terminal:
chmod +x gdc
./gdc
and follow instructions.
Here I tried to copy/paste DualShok 4 mappings and setup it for DualSense: dualsense-osx.gamepads.zip (7.0 KB)
put this file into your project folder and then setup path to this file in game.project file (pls, pay attention, you can’t change files in builtins! Only copy/paste these files into your project folder and use it from there):
Awesome! That worked. I guess I did something wrong when I tried the same. I will take a look into the file and see where my mistake was. The download for the gdc tool is not working for me but I did try that approach and the tool wouldn’t work. Do you have another link?