How to disable character movement(rotation) when jumping

This is a flexible solution.