Kinect HandPointer loose grip out of the screen

348 views Asked by At

I'm writing an application with kinect sdk 1.8, i have implemented a kinect scrollviewer and a custom "HoverButton" that launch a loader each time the hand pointer is over a button with the property IsInGripInteraction==false. All works until i try this behaviour: Made a Grip to scroll the kinectScrollviewer Content, with grip interaction still in function (the hand pointer image , azure and close...) i bring my hand out the screen. After doing this i reenter in the screen with my hand closed but the HandPointer is open (the default open hand image). At this point the handpointer seems to be in IsInGripInteraction==True but with the default open image, my loader not recognize the hand over any button... To make things works again i have to close and open my hand. There's any solution? I can block the kinect hand pointer before it exit from the screen? Or i can force the update of the Grip state of the HandPointer?

EDIT

I found the real cause, what loose reactivity is the method GetIsOver of kinectregion.handpointers[indexofactualhand].GetIsOver(UIElement). Sometimes when my hand scroll over the screen the method return always false until i close and open my hand again.Ther's a way to refresh runtime the handPointer?

1

There are 1 answers

0
Frozen--Wings On

I've had the same problem recently. Try to add this to the UIElement you're interacting with.

KinectRegion.AddHandPointerEnterHandler(this, OnHandPointerEnter);

private void OnHandPointerEnter(object sender, HandPointerEventArgs e)
{
    e.HandPointer.Capture(this);
}

Worked for me.