The source of the issue is differences between viewport resolution and screen resolution. Cursor position is reported w.r.t. screen space, but we need to map that value to the viewport to correctly test collision. For example, using 1080x1080f the viewport res is the expected 1080x1080. However the screen res for that setting could be 1280x960 (With some stretching done after the fact). To adjust for this we need scale the mouse position by the viewport res divided by the screen res (Ex: SWindow::GetSizeInScreen / SlateApplicationBase::CachedDisplayMetrics).

Steps to Reproduce
  1. Open a game with clickable actors & widgets
    1. Ex: QA-Game on TM-UMG
    2. You will need to add a clickable actor to the above
  2. Play standalone
  3. Open command console.
  4. r.SetRes 1080x1080f
    1. Use a non-standard resolution for your monitor
  5. Attempt to click on actors / widgets
  6. Attempt to click & drag on all edges of screen.

Expected: Clicking is pixel accurate, conforms to exact shape of actors / widgets. Can click & drag entire width of screen

Observed: Collisions are offset. Dragging is clipped to a region smaller than the entire screen.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-117869 in the post.

Login to Vote

ComponentUE - Editor - UI Systems - Slate
Affects Versions4.27
Target Fix5.0
Fix Commit16999127
Main Commit17576579
CreatedJun 10, 2021
ResolvedJul 29, 2021
UpdatedDec 1, 2021