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

**URL:** <https://forums.unrealengine.com/t/bug-4-3-hud-hitboxes-offset-with-constrain-aspect-ratio-on/290829>\
**Category:** UI\
**Tags:** buttons, hud, aspect-ratio, unreal-engine, hitbox, question\
**Created:** [August 13, 2014, 3:04am UTC](https://forums.unrealengine.com/t/bug-4-3-hud-hitboxes-offset-with-constrain-aspect-ratio-on/290829 "2014-08-13T03:04:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ExP\_Films\_USA](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ExP\_Films\_USA](https://forums.unrealengine.com/u/ExP_Films_USA)\
**Post date:** [August 13, 2014, 3:04am UTC](https://forums.unrealengine.com/t/bug-4-3-hud-hitboxes-offset-with-constrain-aspect-ratio-on/290829/1 "2014-08-13T03:04:10Z")

</div>

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](https://drive.google.com/file/d/0B-MNe9YRqGz-R2xDZFF2MDdoME0/edit?usp=sharing "NoCAR")**

**[With Constrain Aspect Ratio - Button and Hitbox drawn in correct location, but does not register when moused over](https://drive.google.com/file/d/0B-MNe9YRqGz-QWJlYmpSUW11VDg/edit?usp=sharing "CAR\_DrawnRight.")**

**[Hitbox registers way offset in the Y](https://drive.google.com/file/d/0B-MNe9YRqGz-SXV1cEcwVkxNNXM/edit?usp=sharing "CAR\_WrongLoc")**

---

<div class="post-metadata">

**Author:** ![TJ\_V](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tj_v/32/1008648_2.png) [@TJ\_V](https://forums.unrealengine.com/u/TJ_V)\
**Post date:** [August 13, 2014, 3:20pm UTC](https://forums.unrealengine.com/t/bug-4-3-hud-hitboxes-offset-with-constrain-aspect-ratio-on/290829/2 "2014-08-13T15:20:04Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ExP\_Films\_USA](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ExP\_Films\_USA](https://forums.unrealengine.com/u/ExP_Films_USA)\
**Post date:** [August 14, 2014, 9:41pm UTC](https://forums.unrealengine.com/t/bug-4-3-hud-hitboxes-offset-with-constrain-aspect-ratio-on/290829/3 "2014-08-14T21:41:38Z")

</div>

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](https://drive.google.com/file/d/0B-MNe9YRqGz-MWRhUFFrdmR5dTQ/edit?usp=sharing "CE1\_NoReg")**

**[Hitbox registering in completely the wrong place in the Y](https://drive.google.com/file/d/0B-MNe9YRqGz-MnA4TkFLV1RPODA/edit?usp=sharing%22CE2_Offset%22)**

---

<div class="post-metadata">

**Author:** ![TJ\_V](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tj_v/32/1008648_2.png) [@TJ\_V](https://forums.unrealengine.com/u/TJ_V)\
**Post date:** [August 14, 2014, 11:10pm UTC](https://forums.unrealengine.com/t/bug-4-3-hud-hitboxes-offset-with-constrain-aspect-ratio-on/290829/4 "2014-08-14T23:10:09Z")

</div>

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. 🙂

Thanks, TJ

---

<div class="post-metadata">

**Author:** ![vipeout](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vipeout](https://forums.unrealengine.com/u/vipeout)\
**Post date:** [September 15, 2015, 12:48pm UTC](https://forums.unrealengine.com/t/bug-4-3-hud-hitboxes-offset-with-constrain-aspect-ratio-on/290829/5 "2015-09-15T12:48:23Z")

</div>

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:

 ![58694-screencoordpic.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/6/1/4617f2f642ccde25cbc5ddaccff7f412669d6d5b.jpeg)

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)

---

<div class="post-metadata">

**Author:** ![TJ\_V](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tj_v/32/1008648_2.png) [@TJ\_V](https://forums.unrealengine.com/u/TJ_V)\
**Post date:** [September 15, 2015, 2:43pm UTC](https://forums.unrealengine.com/t/bug-4-3-hud-hitboxes-offset-with-constrain-aspect-ratio-on/290829/6 "2015-09-15T14:43:44Z")

</div>

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
