Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Wrong mouse coordinates when using 'Constrain Aspect Ratio' on active camera

There is an issue with the engine reporting current mouse coordinates. When constrain is not used, everything is fine no matter what aspect ratio is used, windowed or fullscreen. Unfortunately when I use the constrain, the mouse coordinates are still from the top-left corner of the window / screen, not the render area which messes up calculations. I would need to figure out the offset and then modify the calculations. I believe that's not the way it should work.

I made a test project without any modifications I normally have and the problem still exists. The project uses blueprint, but the same problem can be seen when the logic is placed in C++.

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: alt text

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)

Product Version: UE 4.8
screencoordpic.png (890.6 kB)
screencoord.zip (3.2 MB)
more ▼

asked Sep 16 '15 at 08:16 AM in Bug Reports

avatar image

374 13 10 25

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hello vipeout,

After looking into your issue I believe that this is working as intended. The position is relative to the size of the viewport (starting from the upper left corner), not necessarily the active sections of the screen. The workaround suggested in your post (offsetting the return value to provide the value needed for the desired outcome) would be a viable workaround in most cases. I hope that this information helps.

Make it a great day

more ▼

answered Sep 16 '15 at 03:37 PM

avatar image

Rudy Q ♦♦ STAFF
47.5k 545 132 522

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question