Set Input Mode Game and UI errors

Hello and thank you for the quick reply!

The situation is following: We want to create an RTS game. The UI input would go to the widgtets with all its buttons and the Game input to the Camera to move it. The UI is standing and recieving input and the Camera is working. Scrolling however is hardly possible since the mouse just escapes the viewport and the scrolling area should just be about 3 pixels wide so I was looking for a way to lock the mouse cursor inside the viewport. I found this option in the “Set Input Mode Game and UI” but i just does not seem to work as I would have expected.

Please note that the three pictures show three different cases and the blueprint functions do not exist simultaneously! I just wantet to show what I did where for each Point in the Question.

I have put the “Create Widget” function in the level blueprint because I also set my Camera as source for the viewport (Set View Target), it was also shown this way in some tutorial. Is this wrong or is there a better place i can put this?

But yes, a Reference to the object is not needed, because there will not be change in the content of the widget.

Now i did follw your three steps and they resulted in the same error as described above under Point 1. The Lock ist there but on the window. There are only 2 things inside this window: Windowframe and Viewport and if i click somwhere in the latter the lock is lost. So the “Lock to viewport” has failed again. I tried it with a direct reference and a stored reference. Both resulted in the same error. The variable should not make any difference anyway from my point of view.