MrTimcakes / Unity-DirectInput

Unity Native Plugin to expose DirectX DirectInput ForceFeedback
GNU Lesser General Public License v3.0
33 stars 12 forks source link

Periodic Force Added - For Engine Vibration or Similar Effect #19

Open rathod-dhruv opened 3 months ago

rathod-dhruv commented 3 months ago

I was using it with a Thrustmaster Wheel while working on a VR Car Sim. I needed an engine vibration-like force feedback, so I added that feature. I've included comments before and after the sections I've edited. Most of my changes are in the DirectInputForceFeedback.h and DirectInputForceFeedback.cpp files.

Additionally, in the VirtualInputDevice.cs file, I commented out some code related to the D-pad because I was using OpenXR, which also registers the D-pad, causing errors. You can ignore this change if it's not relevant to you. I also made modifications to DIManger.cs and the demo script.

image