I can detect my left and right hand in this code:
using UnityEngine;
using System.Collections.Generic;
using Leap;
using Leap.Unity;
public class Swimming : MonoBehaviour {
LeapProvider provider;
void Start ()
{
provider = FindObjectOfType<LeapProvider>() as LeapProvider;
}
void Update ()
{
Frame frame = provider.CurrentFrame;
foreach (Hand hand in frame.Hands)
{
if (hand.IsLeft) {
Debug.Log ("Left hand is present");
} else if (hand.IsRight) {
Debug.Log ("Right hand is present");
}
if(hand.IsLeft && hand.IsRight == true){
Debug.Log ("Both hand are present");
}
}
}
}
So far it this is my code but when i try my both hands infront of the leap motion the debug.log("both hands are present"); isn't working. can someone help me please