I am trying to map the leap motion coordinates to the coordinates used in Unity, the code i'm am using is from the Leap Motion API and is shown below. It is contained in the void Update.
Frame frame = controller.Frame();
FingerList fingers = frame.Fingers;
for (int i = 0; i < fingers.Count; i++)
{
Finger finger = fingers[i];
Vector position = finger.TipPosition;
Vector3 convertedPosition = position.ToUnity(false);
Debug.Log(convertedPosition);
}
The code should output the coordinates of the tip of the furthest foward finger to the console (so if the finger tip was to be held at the Unity coordinate of (0, 0, 0), the coordinate of my 'convertedPosition' variable should then also be (0, 0, 0)) However, the coordinates do not even slight match.
Does anyone know why? Apologies if this is a really simple task to solve, I am still getting to grips with this.