rewritten transform for mocap and solved some bugs for the calculation of isFacing