Pointerlock refactoring