This paper provides a generic approach based on a machine learning random forest algorithm, which employs the Leap Motion gesture tracking device. It trains on a customized gesture dataset that aims to build six gesture recognition classification models and applies them to the Unreal Engine virtual scenes, then release the handle from its captivity to create a new manner of human interaction in virtual environments.