Oops yes ... You will have to add a function to convert Leap.Vector to Vector3 indeed. I suggest you to use extension methods.
Add a new file called VectorExtensions. And add the following code : (Not really sure though)
using UnityEngine;
using UnityEngine.UI ;
using Leap;
public static class VectorExtensions
{
public static Vector3 ToVector3( this Vector vector )
{
return new Vector3( vector.x, vector.y, 1 - vector.z ) ;
}
}
Then, you can easily transform a Leap.Vector to Unity Vector :
Vector3 normalizedPosition = controller.Frame().InteractionBox.NormalizePoint( controller.Frame().Hands.Frontmost.StabilizedPalmPosition, false ).ToVector3() ;
About this line, feel free to "divide" it in multiple lines :
void Update()
{
Frame currentFrame = controller.Frame() ;
Hand frontmostHand = currentFrame.Hands.FrontMost ;
Vector3 normalizedPosition = currentFrame.InteractionBox.NormalizePoint( frontmostHand .StabilizedPalmPosition, false ).ToVector3()
}
And don't forget I use a hand here, and not fingers ! So you will have to change this in fact ! I let you look for tips positions.