I’m Unity user and i recently moved to UE4. I was trying to get the Mouse cursor (witch is visible in the viewport) moving just inside a rectangle. Here is my C# code i want to get in Blueprint:
deadzone_rect = new Rect((Screen.width / 2) - (deadzone_radius), (Screen.height / 2) - (deadzone_radius), deadzone_radius * 2, deadzone_radius * 2);
You literally just plug that into the appropriate blueprint nodes to get it working.
Use the following nodes to get the appropriate values: getViewportSize getMousePosition
Be warned though. Im having trouble with return values on mouseposition when playing windowed and having the mouse go past the viewport.