How do I get FaceTrackNoIR's input in Unity?

I have recently obtained FaceTrackNoIR v200 and have it set up and working for at least one game (Elite Dangerous).
I already have full working VR menu that works with the SteamVR asset . The scene can handle both having and not having an HMD.

I am wondering how I can use FTNIR’s input data in my Unity project

After much hunting, I found the following source and converted it to work with the 64bit version.
The data will need to be smoothed and manipulated to work nicely, it seems very raw at the moment.

Go to : C:\Program Files (x86)\Abbequerque Inc\FaceTrackNoIR_v200
And copy : FreeTrackClient64.dll
Into your Unity project under : Assets\Plugins
Create a script called FreeTrackClientDll and replace its contents with the following :

using System;
using UnityEngine;
using System.Collections;
using System.Runtime.InteropServices;

public class FreeTrackClientDll : MonoBehaviour
    public struct FreeTrackData
        public int dataid;
        public int camwidth, camheight;
        public Single Yaw, Pitch, Roll, X, Y, Z;
        public Single RawYaw, RawPitch, RawRoll;
        public Single RawX, RawY, RawZ;
        public Single x1, y1, x2, y2, x3, y3, x4, y4;

    public static extern bool FTGetData(ref FreeTrackData data);

    public static extern string FTGetDllVersion();

    public static extern void FTReportID(Int32 name);

    public static extern string FTProvider();

    public float Yaw = 0F;
    public float Pitch = 0F;
    public float Roll = 0F;
    public float X = 0F;
    public float Y = 0F;
    public float Z = 0F;

    public float RawYaw = 0F;
    public float RawPitch = 0F;
    public float RawRoll = 0F;
    public float RawX = 0F;
    public float RawY = 0F;
    public float RawZ = 0F;

    public float x1 = 0F;
    public float y1 = 0F;
    public float x2 = 0F;
    public float y2 = 0F;
    public float x3 = 0F;
    public float y3 = 0F;
    public float x4 = 0F;
    public float y4 = 0F;

    void Update()
        FreeTrackClientDll.FreeTrackData FreeTrackData;
        FreeTrackData = new FreeTrackClientDll.FreeTrackData();
        if (!FreeTrackClientDll.FTGetData(ref FreeTrackData))
            Debug.Log("FTGetData returned false. FreeTrack likely not working.");
        FreeTrackClientDll.FTGetData(ref FreeTrackData);

        Yaw = FreeTrackData.Yaw;
        Pitch = FreeTrackData.Pitch;
        Roll = FreeTrackData.Roll;
        X = FreeTrackData.X;
        Y = FreeTrackData.Y;
        Z = FreeTrackData.Z;

        RawYaw = FreeTrackData.RawYaw;
        RawPitch = FreeTrackData.RawPitch;
        RawRoll = FreeTrackData.RawRoll;

        RawX = FreeTrackData.RawX;
        RawY = FreeTrackData.RawY;
        RawZ = FreeTrackData.RawZ;

        x1 = FreeTrackData.x1;
        y1 = FreeTrackData.y1;
        x2 = FreeTrackData.x2;
        y2 = FreeTrackData.y2;
        x3 = FreeTrackData.x3;
        y3 = FreeTrackData.y3;
        x4 = FreeTrackData.x4;
        y4 = FreeTrackData.y4;

Here is a script that works quite nicely for smooth data, it is adapted from the same source. Use RAW input for unfiltered data.

using UnityEngine;
using System.Collections;

public class TranslateToCube : MonoBehaviour
    public FreeTrackClientDll fTInput;
    public bool useRAWData;
    public Transform target;

    public float positionScale = 0.001f;
    public float positionLerpRate = 5;
    public float rotationScale = 60.0f;
    public float rotationLerpRate = 5;

    private Vector3 startPos =;
    private Vector3 addedPos =;

    private Vector3 startEul =;
    private Vector3 addedEul =;

    void Start()
        startPos = target.position;
        startEul = target.eulerAngles;

    void Update()
        addedPos = Vector3.Lerp(addedPos, (new Vector3(fTInput.X, fTInput.Y, -fTInput.Z) * positionScale), positionLerpRate * Time.deltaTime);
        addedEul = new Vector3(
           Mathf.LerpAngle(addedEul.x, (useRAWData == true ? fTInput.RawPitch : fTInput.Pitch) * rotationScale, rotationLerpRate * Time.deltaTime),
           Mathf.LerpAngle(addedEul.y, (useRAWData == true ? fTInput.RawYaw : fTInput.Yaw) * rotationScale, rotationLerpRate * Time.deltaTime),
           Mathf.LerpAngle(addedEul.z, (useRAWData == true ? fTInput.RawRoll : fTInput.Roll) * rotationScale, rotationLerpRate * Time.deltaTime)

        if (target)
            target.position = startPos + addedPos;
            target.eulerAngles = startEul + addedEul;