How can I get touch location while holding a button?
I'm working on a mobile shooter, and right now the player can look around and aim by dragging anywhere on the screen that isn't a mobile joystick or a button, and I have a fire button for shooting. The problem is you can't (reasonably) aim while shooting. My initial thought was to implement the exact same logic that I'm using right now to find the touch delta every frame and add controller rotation. The issue is that I can't seem to get the touch location while holding the button down. My Widget Blueprint looks like this:
But when I run the game it just prints the touch coordinates of where the button was pressed every frame. Is there any way to get the touch coordinates while holding a button and dragging? Thanks!
asked Sep 27 '18 at 11:05 PM in Blueprint Scripting
There is a Touch event that has Pressed, Released and Moved events. Store the Moved vector to see where it has been dragged to.
answered Nov 25 '18 at 09:59 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here