How can I hide the mouse cursor with the game window border?

Hello!

I’m working on an inspection system, like in Layers of Fear 2. When I interact with an object I use Show Mouse Cursor, and when player clicks again, he can rotate the object and the cursor is hidden. When he release, mouse cursor appear again. With Right click he go out of the inspection mode back to the game. So my problem is when I’m about to rotate the object, there is a game window border and I can’t rotate it while I want. It stops when the hidden mouse reaches the border of the window. This problem only appears when I use show mouse cursor anywhere in my code. How can I fix this?

Second problem is bluring the background while inspecting an item. How can I do that?

Hi!

  • Do you implement your logic of rotation with OnMouseMove? Or maybe with some other Mouse events? If yes, you should just make use of Mouse Capture thing(Capture Mouse | Unreal Engine Documentation). With it your mouse events will be handled by widget that captured the mouse. But dont forget to release capture after that
  • As for the second - can you share some more details?

For the first: I’m implementing the rotation logic into a custom fuction (first, second and third picture). I don’t really understand this CaptureMouse thing so if you could explain it I would be really happy!

For the second: When the object is close (inspecting), I want to blur the background, like the door and that chair. (Fourth picture)