Kinect V2 with UI

So I’ve been messing around with a Kinect V2 for awhile and now I’m trying to set up some sick Minority Report UIs. So I’ve been looking at the ScrollRect and have had some luck. The Kinect V2 recognizes basic hand gestures and I’ve set them up as bools: isOpen, isClosed, isPointing… So I want to be able to scroll when isClosed. The simple test of making the rectTransform equal to a modified value of the user’s hand showed me that the scrollRect will still automatically the handle the elasticity and fun stuff. But since I’m resetting its position every time the hand opens and closes its not very useful.
Is there a way to spoof the mouse down for dragging the scrollRect? I don’t really want to rewrite all this stuff that the scrollRect already handles pretty well. Is there a way to just set it into the dragging state with another UI element driven by the Kinect as the pointer? I see there is a Dragging bool in the scrollRect but I don’t think I can access that.

What you want to do is write a custom input module for kinect.

See: stramit’s gists · GitHub for a listing of the existing input modules. You want to ‘listen’ for kinect events such as a gesture and then send the appropriate event.

Awesome! Thanks Tim. If I get something I think is usable I’ll make sure to share it.

2 Likes