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 Touch Pos In Widget [UMG]

Hello everyone! Ive got a problem with trying to get Touch position in UMG widget. Once I tried to use node Get Mouse Position on Viewport (its work fine to me in editor), but its doesn't work on Mobile with touch (return 0, 0 pos). Maybe any ideas how get Touch position inside UMG?

Product Version: UE 4.20
Tags:
more ▼

asked Aug 15 '18 at 01:09 PM in Blueprint Scripting

avatar image

GloryOfNight
61 3 4 10

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Have you tried overriding OnTouchStarted and Getting Screen Space Position?

more ▼

answered Aug 15 '18 at 01:29 PM

avatar image

Everynone
12.5k 72 24 51

avatar image GloryOfNight Aug 15 '18 at 01:49 PM

Sorry, I had mistake on title. That about get touch pos. in widget So, if I has widget 1440x2560 & viewport 540x960 I want to get values that fit to widget size (like do node Get Mouse Position on Viewport, values in range of 1440x2560)

I tried to use Get Screen Pos. & its return viewport values (in range 540x960)

avatar image Everynone Aug 15 '18 at 01:59 PM

Sounds like you want local size but I'm not sure:

alt text

There's a couple more absolute nodes, experiment with those if the above does not get you what you need.

capture.png (48.2 kB)
avatar image GloryOfNight Aug 15 '18 at 02:24 PM

Thanks! That work for me

avatar image Everynone Aug 15 '18 at 02:25 PM

Awesome, good luck with the rest!

(comments are locked)
10|2000 characters needed characters left
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