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"

Override touch interface for a single actor

Hello all,

Can anyone help me?

I need to override my existing mobile touch input controls when a single actor in the foreground is touched.

Scenario: In the main interface, tap / swipe controls character movement (blueprint > Player Controller) - this is working fine. Tap on an item to access the item's features / move it (blueprint > actor) - this also works fine BUT also triggers the movement controls.

How can I switch the movement controlling functions in the Player Controller OFF when the actor's touch event fires?

I have been experimenting with the Get Hit Result Under Finger by Channel node, but can't seem to make it work as expected. Any advice is appreciated.

BP Actor Touch event

Player Controller Touch Event

Here's what I'm trying to achieve (sketched badly).

intended touch interface

Product Version: UE 4.21
more ▼

asked May 27 '19 at 01:55 AM in Blueprint Scripting

avatar image

25 3 4 8

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

1 answer: sort voted first

I have finally solved this with some help over on Reddit

The problem was due to the fact that my touch handler was working directly with Input Actions. Instead of overriding the input, all I had to do was isolate the bit of my touch interpreter that was firing incorrectly (it was the swipe detection) and FIX MY RUBBISH CODE!

The fix in this case was to ensure that my touch handler only fired for Finger 1 release while that finger was held down. This was done by incementing an integer on touch pressed, then, on touch released, branch if the value is 1 (or higher) and reset that integer after doing stuff.

Touch > ++ presses > release > Is presses 1 or more? > Figure out the swipe stuff > Reset presses

Without this test, Touch Released would fire for any touch release (including UI Widgets), not just after a swipe like I needed it to. I'm off to learn how to code properly.

more ▼

answered Jun 27 '19 at 08:27 AM

avatar image

25 3 4 8

(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