Hi,
I am currently trying out the Orion SDK for a University VR-project (grabbing objects and manipulating orientation in a virtual supermarket).
The documentation seems to suggest, that you can access the method by Hand(GrabAngle), but I can't seem to make it work with the below code. I also tried 'float grabAngle = Leap.Hand.GrabAngle;'.
Do you have any suggestions to what I am doing wrong?
using UnityEngine;
using System.Collections.Generic;
using Leap;
public class LeapTest : MonoBehaviour {
void Start ()
{
Controller controller = new Controller ();
Frame frame = controller.Frame ();
if(frame.Hands.Count > 0){
List<Hand> hands = frame.Hands;
Hand firstHand = hands [0];
//Hand secondHand = hands [1];
}
}
void Update ()
{
float grabAngle = firstHand(GrabAngle);
if (grabAngle < 1.0) { // between 0.0 and 3.1415...etc ??
print("Grab detected!");
}
}
}