x

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"

Get correct size and position of slot in UMG

Get Slot as Canvas Slot -> Get Position / Get Size returns incorrect values

How I discovered that

I want to calculate min and max Xs and Ys of the "ViewPanel". I do that by adding position X,Y with size X,Y respectively.

When I try to check the DeltaX and DeltaY based on where the player clicked (inside the ViewPanel), I get incorrect results near edges (Instead of ~0 , I get numbers like 200 , 183 etc...)

Some screenshots:

alt text alt text alt text

Product Version: UE 4.9
Tags:
screenshot_4.png (436.2 kB)
screenshot_2.png (858.0 kB)
screenshot_1.png (63.1 kB)
more ▼

asked Dec 12 '15 at 08:04 AM in Blueprint Scripting

avatar image

Zarkopafilis
335 33 26 45

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

1 answer: sort voted first

You need to get Mouse Position Scaled by DPI from Player Controller. It is the go-to node for messing around with the viewport.

more ▼

answered Dec 12 '15 at 05:36 PM

avatar image

Zarkopafilis
335 33 26 45

(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