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"

UMG Pinch to scale

Hello,
We are currently working on a Multitouch application using UE4 and the UMG UI system and currently I am struggling with touch gestures.

I have multiple widgets on a large screen which one or more users should be able to move around or scale using a pinch gesture, no 3D scene, only UMG widgets.

Moving around the widget was no problem, I used the OnTouchStarted, OnTouchMoved and OnTouchEnded events. But now I dont know how to implement a pinch to scale/zoom function. I assume I have to use the pointer index and save it on touch started and then calculate the distance between two touch points, but how exactly can I implement this? Is this even the correct way or is there a better solution for this?

Product Version: UE 4.21
Tags:
more ▼

asked Jan 07 '19 at 02:24 PM in Blueprint Scripting

avatar image

C0dR
68 2 7 12

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

1 answer: sort voted first

I suggest using a plugin to get you started with pinch scale gestures. There's some out there that work, and It'll likely save you a lot of time.

To manually calculate pinching, you'll want to manage a list of touched down fingers and their positions, probably in a map then calculate percentage difference in vector distances from each other compared to their initial touch down distances.

more ▼

answered Jan 07 '19 at 03:53 PM

avatar image

BenVlodgi
2.1k 38 17 52

avatar image C0dR Jan 09 '19 at 09:47 AM

I ended up using the plugin, it saves quite some time.

(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