Search Unity

How can I use DirectInput Force Feedback in steering wheels?

Discussion in 'Editor & General Support' started by Dreamwriter, Oct 18, 2016.

  1. Dreamwriter

    Dreamwriter

    Joined:
    Jul 22, 2011
    Posts:
    472
    I want to support more than just Logitech steering wheels (which have a Unity plugin); I want to support "pro" steering wheels like Fanatec's ClubSport and others, so I need full DirectInput ForceFeedback. It seems that Unity doesn't have direct support for that, is there a way to embed DirectInput calls into Unity or something? Any good plugins out there for it?
     
  2. rifter

    rifter

    Joined:
    Jan 1, 2013
    Posts:
    7
    This was almost one year ago, had someone found a solution ?
     
  3. Dreamwriter

    Dreamwriter

    Joined:
    Jul 22, 2011
    Posts:
    472
    My company is using Vehicle Physics Pro, which includes a simple DirectInput wrapper DLL, which we use for Force Feedback. It’s not ideal, but it works, we’ve used it on three different steering wheels from different manufacturers. I’ve also heard that the Logitech SDK on the AssetStore works for different wheels since it also acts as a DirectInput wrapper, though there was some problem with that that caused VPP to use something else.
     
  4. MathewHI

    MathewHI

    Joined:
    Mar 29, 2016
    Posts:
    501
    Interestingly I went saw on the Fanatec website that they have an SDK but state that you do not have to use it to
    program for their wheels, only be able to use DirectInput to control it. My question would be how do you implement DirectInput with Unity as DirectInput is c++ and Unity uses C#.
     
  5. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    You create a native plug-in: https://www.alanzucconi.com/2015/10/11/how-to-write-native-plugins-for-unity/
     
    HelenL and MathewHI like this.
  6. HelenL

    HelenL

    Joined:
    Jan 5, 2019
    Posts:
    3