Disable player movement but allow camera control

Couldn’t you do the same logic in your C++ code?
I mean you already have functions bound to events. Just add this additional logic in there. Its only a single If-else statement.