Been messing with the 3rd person blueprint template, and one issue I haven’t been able to resolve is locking the mouse to the viewport when testing in pie. There seem to be tons of other posts about this, but never a clear answer, like I will see comments saying the issue is now fixed in much older versions of the engine, but in 4.19 locking the mouse to the viewport seems to not work at all. I have tried some of the suggestions from other posts but to no avail. What is the expected behavior here, if testing in pie in for example viewport or windowed mode is not supposed to lock the mouse to the viewport/window by default then what is the method to make that happen?
I’m pretty sure all you need to do is use the Set Focus To Game Viewport node somewhere in a Begin Play event. By default, you have to click on the viewport when playing to enable controls, but using this node automatically sets the focus on the viewport so you don’t have that issue.
The problem ended up being that I had an instance of ue3 running as well and that was affecting the mouse lock in ue4.