using UnityEngine;
using System.Collections;
using System;
using UnityEngine.UI;
public class GestureControlTest : MonoBehaviour,KinectGestures.GestureListenerInterface {
private Text text;
// Use this for initialization
void Start()
{
text = GetComponent<Text>();
}
// Update is called once per frame
void Update()
{
}
public bool GestureCancelled(long userId, int userIndex, KinectGestures.Gestures gesture, KinectInterop.JointType joint)
{
return true;
}
public bool GestureCompleted(long userId, int userIndex, KinectGestures.Gestures gesture, KinectInterop.JointType joint, Vector3 screenPos)
{
if(gesture == KinectGestures.Gestures.SwipeRight)
{
text.text = "用户 SwipeRight 手势";
print("用户 SwipeRight 手势");
}
return true;
}
public void GestureInProgress(long userId, int userInd
Kinect for Unity V2 代码示例(三) 手势控制
最新推荐文章于 2025-05-08 16:01:42 发布