store the hit result under the finger while pressed then reference that variable when you 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!
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…?
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.
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.
not that I know of.
ive heard that using tick in c++ has less overhead than blueprint, so you go that route.
Have you tried this?
Where is this accessed?
This is one of standart overridable widget touch events
I am attempting this in world space, through either the player controller or pawn. This is not for a widget screen. Thanks!
are you able to post this as a second answer? I still need to try this but I have a good feeling ha