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 Hit Result Under Finger on RELEASE

Hello all,

I am currently struggling to find a way to replicate some mobile game touch mechanics in Unreal. What I would like to do is get the hit result location / actor by channel on touch release. So far I seem to get a hit result location of 0,0,0 on release. when I use the touch input of Pressed, and get hit result under finger, I get a valid result.

Any way to get the finger released hit result??

Thanks!

Product Version: UE 4.21
Tags:
more ▼

asked Feb 12 '19 at 11:52 PM in Blueprint Scripting

avatar image

Austinlele
32 3 4 10

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

3 answers: sort voted first

Oh ok, but still it's pretty much same, just standart events in PlayerController:alt text

touchend.jpg (104.8 kB)
more ▼

answered Feb 24 '19 at 08:29 PM

avatar image

sysuev
26 3 2

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

Have you tried this?

alt text

more ▼

answered Feb 13 '19 at 08:16 AM

avatar image

chipsuev
6 3 4

avatar image Austinlele Feb 21 '19 at 09:39 PM

Where is this accessed?

avatar image sysuev Feb 24 '19 at 06:59 PM

This is one of standart overridable widget touch events alt text

avatar image Austinlele Feb 24 '19 at 08:05 PM

I am attempting this in world space, through either the player controller or pawn. This is not for a widget screen. Thanks!

avatar image Austinlele Mar 09 '19 at 07:30 PM

are you able to post this as a second answer? I still need to try this but I have a good feeling ha

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

store the hit result under the finger while pressed then reference that variable when you release.

more ▼

answered Feb 13 '19 at 12:43 AM

avatar image

IndieGameCove
1k 6 4 10

avatar image Austinlele Feb 13 '19 at 12:59 AM

I have that figured out, but that is still not the functionality I desire. Say a player presses on some element and drags their finger, then decides to release on another element.. I don't want the first element taking the hit result.

Unless I dont realize that hit result updates on finger drag or otherwise like a tick..?

avatar image IndieGameCove Feb 13 '19 at 01:32 AM

I don't make mobile games so idk if the pressed input is fired off every tick or just once. however even if it is fired just once you could hook up a gate node that is run every tick, opening on pressed and closing on release.

avatar image Austinlele Feb 13 '19 at 03:17 AM

I can try that, i'm sure it would work. Since this is mobile though, is there any chance this can be accomplished without a tick? Some released event that returns the last known "touch hit result/location" would be perfect.

avatar image IndieGameCove Feb 13 '19 at 03:43 AM

not that I know of. ive heard that using tick in c++ has less overhead than blueprint, so you go that route.

(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