Detect mouse outside game window event?

Hi! im trying to detect if the mouse is outside the screen because when this happen, the spring arm of my player goes away to a specific location on the map.
Any one have an idea?

Thank you!

bool APlayerController::GetMousePosition(float& LocationX, float& LocationY) const should return false when outside the screen

6 Likes