ML MRTK Package 1.8.0
We noticed some annoying behaviour with the controller disabling when the hand tracking is lost. After some digging, it looks like a bug in StateToHandedness() inside MLControllerHandedness.
This function attempts to tell MRTK which hand the controller is in. Most of the time the lower-level input system can determine which hand the controller is in and that is passed straight through to the MRTK. However, when hand tracking is lost the lower-level input system just returns MLInputControllerHand.None. At this point StateToHandedness() attempts to make a guess which hand the controller is in. Sensibly it attempts to return the previously assigned handedness unless the controller is more than a set distance away from the head.
This distance from head check is the problem. The logic is comparing the controller position returned from the input system with the world space camera position. However, the controller position is returned in a different coordinate frame to the camera. This logic test then fails because it thinks the controller is very far from the head and then turns off the controller.
All other uses of the controller position first transform the controller position by the MixedRealityPlayspace to put it in the right coordinate frame
If you change the logic in StateToHandedness to do this too, then the controller will remain on and in the correct hand even when the hand tracking is lost. We've made this change locally and the behaviour is much nicer.
It might be worth reviewing the whole of that function. Some of the logic seems to be redundant which makes it harder to follow.