Swipe motion accuracy

I don’t know how to do swipe gestures in Unreal but I do know how to track the touch start location and the touch end location, and you can subtract one of those vectors from the other in order to get usable numbers, Y component of the vector is screen coordinate you can conceptualize as the forward or upward swipe motion, and X for the side to side.

It won’t be a direct ratio between screen coords and world coords, especially at different screen resolutions though so you’ll want to use some normalizing function nodes to make it work the same on all devices. Sorry I can’t remember the names of them.

Whether you use that approach or not, you can find the deviation between two vectors (for example the straight dead-on direction toward the target and the direction the user swiped) by feeding them both into a dot product node.

Dot product takes two vectors and returns a value between -1 and 1, where 1 is exactly parallel, 0 is perpendicular and -1 means they face opposite directions.