Lock rotation in C++ not reflecting in game

Bump for 4 years later this post helped save me. This solution works perfectly.