Hey people,
I’m new to Hololens dev and I’m going through the examples from the hololens academy. Currently, I’m playing around with 211, the chapter talking about gestures and hand tracking. The third section describes hand guidance to provide feedback when a tracked hand is near the boundary of view of the hololens. This example doesn’t work and I believe the issue is with interactionmanager. When I select an object, the state returned from InteractionSourceUpdatedEventArgs always has selectPressed as false. Should this not be true when I have used the “click” gesture with my hand on a hologram? If I change this to anyPressed, then I run into an issue with sourceLossRisk. The state object always shows this value to be 1. This is despite me having my hand in the center of view. This value messes up calculation of distance for positioning of the cursor. So, what is wrong with this class?
The code sets up the event as follows:
InteractionManager.InteractionSourceUpdated += InteractionManager_InteractionSourceUpdated;
The function:
private void InteractionManager_InteractionSourceUpdated(InteractionSourceUpdatedEventArgs obj)
Then, if I print obj.state information, the selectPressed and sourceLossRisk are always false/1 respectively. This is despite me “clicking” on a hologram and holding my hand in the center of my view. I don’t understand why these values never change. Any help to a noob would be appreciated!