Hit Result Under Finger returns False

Hello,

I am new to the Unreal Engine and i am currently on a project for an Android Game. I want to find the collision UV of an object but i can’t seem to get a result from the function “Get Hit Result Under Finger For Object”.
I tried with the “For Channel” function but still the same thing. I tried adding all the available pins to the Make Array node but still to no avail. I tried passing the finger index from the Input Event but still nothing.
I also tried another approach for PC, using the Line Trace for Objects and it works perfect but with the Touch i can’t seem to get it to work.

The execution always ends up on the Print String function.

As a side note: i have successfully set up other things like, pinch to zoom and rotating around an object using touch.
I believe i have googled probably all similar issues that is why i am posting myself :S

Thank you in advance,
Kevin

The attached screen shows how i am currently keeping it, using the For Object version.

Which channel did you use in your for channel? Did you try the visibility option?

I did try the Visibility and also Camera just to be sure. My object is visible and has Block All collision. I will post a screenshot of my BP when i get back from work sorry.

Ok, i edited the question by adding the screenshot attachment.

Ok, thanks for the screenshot. Can you try selecting the world dynamic instead of world static?

I have tried making the array with every listed element in it, altogether, and it still won’t work :confused:

Hummm. Can you try the for channel and select visibility? Then in the collision preset of the blueprint you want to hit, instead of choosing the block all collision, select custom and select “block” for the visibility channel.

Ok, so i tried it, got the screenshot of the collision settings i tried for the object. I also tried adding new sphere, cube and it’s still the same thing, i can’t get the trace working.
I tried by checking all collision channels, objects - and by simply checking the visibility channel as shown below. I am starting to think it might be a bug with UE? Probably just for my case though cause i’ve seen others that have got it working :S

261616-collision.png

Can you add a break hit result to your get hit under cursor and print the blocking hit boolean?

Alright, using the Get Hit Under Cursor For Channel and breaking the hit result : Blocking Hit returns true when i click on the object and false when i click on the skysphere - ideally as i want it
The same also with the For Objects version using the cursor, i am just surprised because touch events properly work and are differentiated between tap and touch to rotate so it’s all good there.

Ok so did it answer your question or do you have another one related to this topic?

Well the function for which this works is called Get Hit Under Cursor For Channel, so i am guessing it will not work on a mobile device right?
As i mentioned in the question, using the cursor the trace works perfectly, but the functions Under Finger don’t work :S. I will test on a real device though as soon as i can and will get back to you, if the Under Cursor version works for touch events too.

Oh sorry I did a typo when I wrote “under cursor” earlier. I meant “under finger” lol Can you try doing the same thing (breaking the hit result and showing the value of the blocking hit boolean) with the under finger one?

Lol i did think about the possible type there but i thought you were trying to verify that my cursor works :stuck_out_tongue: As for the break result i have tried that before also and it returns false - and the hit actor, component return something like NONE, NULL i don’t remember the term correctly

Oh I see, if that’s really the case, then maybe your problem comes from your controller which is null itself. Maybe you should try putting it outside of your function for testing purpose.

I tried putting the function outside still the same problem - i also checked with Is Valid node targeting the Player Controller and it returns true so i guess no problem there. I was thinking maybe there is some sort of setting i must change on my Project Settings perhaps? Just thinking about it :confused:

That’s cool! Sorry I couldn’t help more. Anyway, glad you found the answer :wink:

Cool! have a great day! :smiley:

SOLUTION:

Ok so i managed to find the problem. So the issue was that the function Get Hit Result … should be called immediately after the input event, in my case after the node Input Action Finger for example. What i was doing in my blueprint was that i was adding a delay after the Input Action node for other reasons, and then calling the Get Hit Result function node.

Apparently putting the Get Hit Result function node right after the Input Action node fixed the issue and now i get a True Hit Result.
I do have issue Finding the UV Collision now since it is returning false but i will look into that before asking help again :S

Thanks.

I really appreciate the help either way, and your patience bro :slight_smile: You still helped me keep in my mind common things i should debug in cases like this :smiley: Thank you!