# PS5 Haptics testing

**URL:** https://qa.fmod.com/t/ps5-haptics-testing/20847
**Category:** Unity
**Created:** [November 6, 2023, 5:33pm UTC](https://qa.fmod.com/t/ps5-haptics-testing/20847 "2023-11-06T17:33:47Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![NQX-DF](https://avatars.discourse-cdn.com/v4/letter/n/74df32/32.png) [@NQX-DF](https://qa.fmod.com/u/NQX-DF)
#### Post date: [November 6, 2023, 5:33pm UTC](https://qa.fmod.com/t/ps5-haptics-testing/20847/1 "2023-11-06T17:33:47Z")

</div>

I feel like this is more fmod than PS5 so I am asking it here.

The workplace doesn’t seem to want to use something like parsec or moonlight so I don’t have a full controller driver to utilize remotely.

How would I test haptics in editor for PC? My understanding is that the Input System supports it as the controller has become more public domain than it used to be.  
I noticed some posts mention the fmod\_controller\_output dll, because we can’t use the user id for the port index, but no mention of using it in the context of Unity which autoloads DLLs and I have no handle for it. (Can’t use RuntimeManager.CoreSystem.setOutputByPlugin) is there any way of achieving my task?

Thanks.

* * *

It seems I can get the handle by forcibly using CoreSystem.loadPlugin and pass that through to setOutputByPlugin. Will return with results

---

<div class="post-metadata">

### Author: ![NQX-DF](https://avatars.discourse-cdn.com/v4/letter/n/74df32/32.png) [@NQX-DF](https://qa.fmod.com/u/NQX-DF)
#### Post date: [November 7, 2023, 10:59am UTC](https://qa.fmod.com/t/ps5-haptics-testing/20847/2 "2023-11-07T10:59:04Z")

</div>

My result with running this code:

```auto
private void Start()
    {
        RuntimeManager.CoreSystem.loadPlugin("Assets/Plugins/FMOD/platforms/win/lib/x86_64/fmod_output_controller.dll", out uint handle);
        RuntimeManager.CoreSystem.setOutputByPlugin(handle);
        
        Bus vibrationBus = RuntimeManager.GetBus(vibrationBusName);

        if (vibrationBus.isValid())
        {
            vibrationBus.setPortIndex(0);
        }
    }

    private void Update()
    {
        foreach (var pad in Gamepad.all)
        {
            if (buttonPressed)
            {
                Debug.Log("Pressed");
                vibrationInstance = RuntimeManager.CreateInstance(vibrationEvent);
                vibrationInstance.start();
            }
            else
            {
                vibrationInstance.stop(STOP_MODE.ALLOWFADEOUT);
                vibrationInstance.release();
            }
                
            buttonPressed = pad.buttonSouth.isPressed;
        }
    }

```

Doesn’t appear to be working, what are the additional steps required to get fmod\_controller\_output working?  
I would say its possible the vibration data is incorrect but the person working on audio assured me he tested it and got vibrations over in the designer.

Unity 2022.3.10, FMOD 2.02.18, InputSystem 1.7.0

---

<div class="post-metadata">

### Author: ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)
#### Post date: [November 8, 2023, 4:34am UTC](https://qa.fmod.com/t/ps5-haptics-testing/20847/3 "2023-11-08T04:34:19Z")

</div>

Thanks for reaching out.

There’s nothing as far as I’m aware that should prevent fmod\_output\_controller.dll from being used to test haptics in Unity, but I’ll do some testing on this on my end shortly and get back to you soon.

---

<div class="post-metadata">

### Author: ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)
#### Post date: [November 9, 2023, 1:01am UTC](https://qa.fmod.com/t/ps5-haptics-testing/20847/4 "2023-11-09T01:01:29Z")

</div>

After testing, the only issue with the code you’ve provided seems to be that `vibrationBus.setPortIndex(0);` isn’t needed, as when using `fmod_output_controller.dll` your controller will use default port index of ulong max. Give removing a that line a shot and let me know whether you’re able to get it working.

---

<div class="post-metadata">

### Author: ![NQX-DF](https://avatars.discourse-cdn.com/v4/letter/n/74df32/32.png) [@NQX-DF](https://qa.fmod.com/u/NQX-DF)
#### Post date: [November 9, 2023, 3:45pm UTC](https://qa.fmod.com/t/ps5-haptics-testing/20847/5 "2023-11-09T15:45:27Z")

</div>

Hey Leah, thanks for responding.

Alongside the setPortIndex I also realised the audio person setup 3 channels on the vibration clips, and the default channel has nothing in so I had to additionally set the parameters for those.  
Now its working.

Thanks.

---

<div class="post-metadata">

### Author: ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)
#### Post date: [November 9, 2023, 9:56pm UTC](https://qa.fmod.com/t/ps5-haptics-testing/20847/6 "2023-11-09T21:56:51Z")

</div>

No problem, happy to hear you got it working!
