[BUG] 4.3 HUD Hitboxes offset with Constrain Aspect Ratio on.

We have a HUD blueprint that draws buttons and their respective hitboxes. It uses a function that calculates the needed X,Y position and outputs the vector2d. I use this exact same vector2d for both positions.

When “Constrain Aspect Ratio” on our camera is OFF, the buttons work correctly.

When “Constrain Aspect Ratio” on our camera is ON, the buttons are drawn in the correct place, “Showdebug Hitbox” shows the hitbox in the correct place as well, but there is actually a weird offset in the Y from where the hitbox actually register.

This did not happen in Unreal 4.2 (where the blueprint was initially created). Only in 4.3.

Images off my Google drive for better idea (sorry for using pictures, I have no MouseCursor capturing software on this station):

No Constrain Aspect Ratio - Works correctly

With Constrain Aspect Ratio - Button and Hitbox drawn in correct location, but does not register when moused over

Hitbox registers way offset in the Y

Hi ExP Films,

Can you try to reproduce the issue in our Content Example level ‘Blueprint_HUD’? I tried testing it there and couldn’t get your results. Also, what Aspect Ratio do you have your camera set to?

Hey TJ Ballard,

Yes, we were able to reproduce the results. I will also add there’s a small typo in the post: it is 4.3.1, not 4.3. Have not checked if this was happening in 4.3.

How it was reproduced:

1.) Open the default pawn blueprint that was used. In Blueprint_HUD, this was MyCharacter_ForHudDemo

2.) Add a Camera component since there was none.

3.) Check ‘Constrain Aspect Ratio.’ The ratio is the default 1.777. Nothing else changed.

Results (again, sorry for using pictures!):

Hitbox and tx drawn in right place, but do not register on mouse-over

Hitbox registering in completely the wrong place in the Y

Hi ExP Films,

Thank you for the feedback. I was able to reproduce the issue and have entered it as TTP# 343947 in our tracking software. Our developers will be looking into it further.

And don’t be sorry for including pictures, we prefer that you do. It makes reproducing issues much easier. :slight_smile:

Thanks, TJ

Reopening the topic since I have encountered the same issue in 4.8.3. I made a test project without any modifications I normally have and the problem still exists.

From my understanding, the absolute mouse position on screen does not take into account the black bars at all, they are completely ignored. Therefore if you have black bars on the left and right of the screen, the horizontal coordinate is corrupted. What I mean is, if both bars are 200 px wide and the render area is 600, that gives total 1000px. But 0,0 is not at the render corner, but rather at the black bar corner. Which is an area nobody is going to use, that’s what the black bars are for. I’d want the 0,0 coordinate be at where 300,0 is in my current situation, which is the first pixel in top left corner.

Screenshot of what I mean:

The issue appears in both editor and non-editor builds.

Open map ‘screencoord’ and hit play. The blueprint will print current coordinates. You can notice where the cursor is by hovering outside of the editor window (I wanted to add something that would render at the cursor location, but all my attempts failed)

Hi vipeout,

This report was specifically about HUD elements in version 4.3. Could you post this as a new report in the Bug Report section? Make to include as much info as possible.

Cheers,

TJ