MrTimcakes / Unity-DirectInput

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

Force feedback cannot be triggered #7

Closed Kojima648 closed 1 year ago

Kojima648 commented 1 year ago

图片 图片

If you have time, I hope you can upload a sample code called in Unity.

MrTimcakes commented 1 year ago

Hey,

Apologies for such a delayed response. From a quick scan of your code snippet, it looks like the spring effect was never enabled prior to being updated. Something you couldn't have known without any documentation to go off. You'll need the line :

DIManager.EnableFFBEffect(DIManager.devices[0], FFBEffects.Spring);

In v0.6.0 I've added a sample to control the FFB from the inspector