Custom Kinect Control for Drag and Drop, IKinectManipulateableController
- Posted: Oct 23, 2014 at 6:00AM
Friend of the Kinect, Marcus Kohnert, goes deep and share how we can create a custom drag and drop control with the Kinect for Windows v2 SDK.
Other times he's been featured;
Drag and Drop sample with IKinectManipulateableController
This sample shows how you can implement a custom KinectControl, for example to move things around in a
To hook into the whole
KinectRegionmagic you can implement your own
When you move your hand
KinectRegionkeeps track of the movements and will constantly check if there is some Kinect enabled control at the current hand pointer’s position.
To determine such a control the
IKinectControlinterface forces you to implement the method
IKinectController CreateController(IInput inputModel, KinectRegion kinectRegion).
IKinectControlis also required to implement
This way you are specifying on what gestures your control will react to.
Because this sample shows how to move controls around the
You’ll find two interfaces in the SDK *.Controls namespace that implement
IKinectControllerand of course they are closely related to the other properties you have to implement.
Those interfaces are:
IsManipulatablereturns true CreateController should return an instance of
For an example how to implement IKinectPressableController see here.
All subscriptions are composed into one
CompositeDisposablethat is disposed in the controllers’s Dispose() method.
- ManipulationStartedObservable –> is fired when the user closes it’s hand
- ManipulationInertiaStartingObservable –> ???
- ManipulationUpdatedObservable –> is fired when the user moves it’s hand while keeping it closed
- ManipulationCompletedObservable –> is fired when the user releases it’s hand
For this sample the most interesting observable is ManipulationUpdatedObservable. Everytime this event is fired the method OnManipulationUpdated is called.
Project Information URL: http://passiondev.wordpress.com/2014/09/11/custom-ikinectcontroller-drag-and-drop/