public void UserDetected(ulong userId, int userIndex) { // the gestures are allowed for the selected user only KinectGestureManager gestureManager = KinectManager.Instance.gestureManager; if (!gestureManager || (userIndex != playerIndex)) { return; } // set the gestures to detect gestureManager.DetectGesture(userId, GestureType.SwipeLeft); gestureManager.DetectGesture(userId, GestureType.SwipeRight); gestureManager.DetectGesture(userId, GestureType.SwipeUp); gestureManager.DetectGesture(userId, GestureType.Psi); gestureManager.DetectGesture(userId, GestureType.ZoomIn); gestureManager.DetectGesture(userId, GestureType.ZoomOut); gestureManager.DetectGesture(userId, GestureType.Wheel); gestureManager.DetectGesture(userId, GestureType.Jump); if (gestureInfo != null) { // gestureInfo.text = "Swipe left, right or up to change the slides."; } }
public void UserDetected(ulong userId, int userIndex) { KinectGestureManager gestureManager = KinectManager.Instance.gestureManager; if (!gestureManager || (userIndex != playerIndex)) { return; } gestureManager.DetectGesture(userId, stageOriginCalibratePose); }
public void UserDetected(ulong userId, int userIndex) { KinectManager kinectManager = KinectManager.Instance; KinectGestureManager gestureManager = kinectManager ? kinectManager.gestureManager : null; if (!gestureManager || (userIndex != playerIndex)) { return; } if (raiseHandToChangeCategory) { gestureManager.DetectGesture(userId, GestureType.RaiseRightHand); gestureManager.DetectGesture(userId, GestureType.RaiseLeftHand); } if (swipeToChangeModel) { gestureManager.DetectGesture(userId, GestureType.SwipeLeft); gestureManager.DetectGesture(userId, GestureType.SwipeRight); } }
/// <summary> /// Invoked when a new user is detected. Here you can start gesture tracking by invoking KinectManager.DetectGesture()-function. /// </summary> /// <param name="userId">User ID</param> /// <param name="userIndex">User index</param> public void UserDetected(ulong userId, int userIndex) { // the gestures are allowed for the selected user only KinectGestureManager gestureManager = KinectManager.Instance.gestureManager; if (!gestureManager || (userIndex != playerIndex)) { return; } // set the gestures to detect gestureManager.DetectGesture(userId, GestureType.ZoomOut); gestureManager.DetectGesture(userId, GestureType.ZoomIn); gestureManager.DetectGesture(userId, GestureType.Wheel); gestureManager.DetectGesture(userId, GestureType.RaiseLeftHand); gestureManager.DetectGesture(userId, GestureType.RaiseRightHand); if (gestureInfo != null) { gestureInfo.text = "Zoom-in or wheel to rotate the model.\nRaise hand to reset it."; } }
// invoked when a new user is detected public void UserDetected(ulong userId, int userIndex) { if (userIndex == playerIndex) { // as an example - detect these user specific gestures KinectGestureManager gestureManager = KinectManager.Instance.gestureManager; foreach (GestureType gesture in detectGestures) { gestureManager.DetectGesture(userId, gesture); } } if (gestureInfo != null) { //gestureInfo.text = "Please do the gestures and look for the gesture detection state."; } }