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"

How to drag an object with touch input?


I'm trying to have it so I can drag an object using my finger on a touch device. I've followed this tutorial (https://docs.unrealengine.com/latest/INT/Resources/ContentExamples/MouseInterface/BlueprintActors/index.html) and then also tried the last comment from this thread (https://answers.unrealengine.com/questions/36186/move-mesh-on-x-axisaccording-to-the-touched-locati.html).

But both cause the same issue, instead of the object dragging it moves by one whenever I click on it and if I attempt to drag it then it moves to 0,0,0.

Below is my blueprint, it's pretty much an exact copy of the one in the Unreal doc tutorial. Any help would be really appreciated.


alt text

Product Version: UE 4.9
bp.png (377.4 kB)
more ▼

asked Apr 08 '16 at 02:25 PM in Blueprint Scripting

avatar image

1 1 2 4

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

1 answer: sort voted first

Regarding your current implementation, I'm wondering if the "Get Hit Result Under Finger by Channel" is actually returning anything. Have you run the hit result through an "IsValid?" node to make sure you're actually hitting something?

Regarding the task in general, if you have access to a TouchInterface, you could try using the "Create Drag Drop Operation" node. That may be a lot simpler if it works.

more ▼

answered Apr 08 '16 at 10:15 PM

avatar image

2.1k 67 84 77

avatar image nathduke Apr 09 '16 at 02:28 PM

Thanks for your reply, I'm still learning so not sure how I would run it through an IsValid?. The object is moving on input though it's just not dragging freely as you'd expect.

The issue is somewhere along the touch chain since when using a mouse it works perfectly.

Had a google around at the drag drop operation and I don't think it'll be appropriate for what I'm wanting to acheive.

avatar image CleanCut Apr 10 '16 at 05:56 AM

Hmm, well if it's moving then it's probably valid. For future reference, to get the IsValid? node just pull off of the object pin you want to check and start typing in "IsVal.." and it should be one of the choices.

I've never tried touch-dragging myself, so I have no further suggestions. Good luck!

(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