Skip to content

Instantly share code, notes, and snippets.

@ged1959
Last active August 29, 2015 14:14
Show Gist options
  • Save ged1959/19783ca25c3d74c97248 to your computer and use it in GitHub Desktop.
Save ged1959/19783ca25c3d74c97248 to your computer and use it in GitHub Desktop.
using UnityEngine;
using System.Collections;
using Leap;
public class test : MonoBehaviour {
Controller controller = new Controller();
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
Frame frame = controller.Frame();
HandList hands = frame.Hands;
FingerList fingers = frame.Fingers;
ToolList tools = frame.Tools;
PointableList pointables = frame.Pointables;
Hand leftMost = hands.Leftmost;
Hand rightMost = hands.Rightmost;
Hand frontMost = hands.Frontmost;
Debug.Log(string.Format(
"手 : {0} 指 : {1} ツール : {2} ポインタ : {3} : 左 : {4} 右 : {5} 手前 : {6}",
hands.Count, fingers.Count, tools.Count, pointables.Count ,leftMost.PalmPosition,
rightMost.PalmPosition, frontMost.PalmPosition));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment