My code works on a PC, but when I try and catch a touch event instead of a click event and cast a hit result from that (on an android device) the location is 0 no matter where I touch, and the actor is null no matter what I’m pressing over. any ideas?
Hi SirYakalot,
How are you calling the hit result and attempting to get the information under it? What version of the editor are you currently using?
4.4.3. I am getting the touch event as I print a string from a branch which is checking for a finger index that equals ‘touch1’. After that I’m piping in the data from a ‘get hit result under finger by channel’, I’m breaking the hit result and printing the data. The setup is exactly the same as the mouse version that works, the only difference is the finger by channel / cursor by channel. Thanks for any help you can give me!
Hi SirYakalot,
Which data are you looking for from the break hit result? Do any of the outputs register or are none of them registering data?
Hi SirYakalot,
We have not heard from you in quite some time. I am marking this thread as answered for tracking purposes. If you are still experiencing this error, please reply with the requested information. Thank you!
For some bizarre reason the solution was selecting the correct texture format for the android device. I had been using the untagged one, I switched to ATC and now it works. Strange. Hopefully this will help someone in the future if they encounter this problem.
Could you provide anymore details? I am having the same issue and I tried switching the textures but it is still always (0,0)
Did anyone ever resolve this? Having a similar issue.
[=“anonymous_user_31b71f52, post:8, topic:295111”]
one ever resolve this? Having
[/]
I´m having the same problem… In my case, rarely times works well but still fails.
I had a similar issue where the hit result was 0 on/after release. For some reason, it is not a good idea to call hit result under finger
on action complete/cancel for a touch input action. I assume its position is simply reset, and we don’t have access to it anymore.
I worked around it by storing a hit result in tick and using that result at release (because I was already doing that).