Search Unity

Implement Force Feedback of Xbox One controller in macOS?

Discussion in 'macOS' started by GuardHei, Jul 21, 2018.

  1. GuardHei

    GuardHei

    Joined:
    Feb 10, 2018
    Posts:
    89
    I am currently working on an action game and have made up the xbox one controller adaption. To improve the combat feedback, I tried to use the forcefeed module. However, the controller works complicated in macOS (my version 10.12 sierra). I originally used the bluetooth adaption, but find the two triggers unmapped. Therefore, I switched to a third-party driver https://github.com/360Controller/360Controller. (Though its name is 360Controller but works with Xbox one). The problem is that, even though the driver claims that developers can reach the ForceFeedback interface of this driver, I have totally no idea of how to do that.

    Then, how can we implement Force Feedback in macOS? It could be via Bluetooth or the driver above or whatever ways. I am really dying to know that. All the plugins I see in the forum and assetstore seem to be only available in Windows and Xbox.

    I know a little cpp, and have no idea of how to call the cpp interface in macOS, so please explaining in a bit detail if the answer is related to native stuffs. Really appreciate your help!

    PS: Sorry for my poor english. If you have any understanding question, please ask.
     
  2. GuardHei

    GuardHei

    Joined:
    Feb 10, 2018
    Posts:
    89
  3. GuardHei

    GuardHei

    Joined:
    Feb 10, 2018
    Posts:
    89
    Finally...... Just finished the function. Can't imagine I did it. To convert .framework to .bundle requires only a change in suffix. The structures are no difference. I've also finished the c# bridge part of reading the cpp source code. The full implementation will be uploaded in the layer below. Creating the lib right now.
     
    JoeStrout likes this.
  4. GuardHei

    GuardHei

    Joined:
    Feb 10, 2018
    Posts:
    89