Crouch via HMD location?

I recently got into vr and have been messing around with unreal engines capabilities for it. I was wondering how to best go about having the character crouch when the hmd location is lowered.

I have never done VR but it seems to me you could just measure whether the distance between the HMD in game and the floor in game is less than 2/3 or 1/2 the character height