2D Touch To Move issues

I’ve been attempting to implement a simple touch to move interface for a 2D side scroller type game (IE, player character moves to touched spot). Tried to implement myself to no avail. Downloaded the touch controls BPs from the marketplace, but they are for a 3D FPS type title and I’m unsure how to modify them to operate for a Paper2D project. I’ve also seen some threads that seem to indicate the best way to implement this sort of movement is through the UMG, but the documentation doesn’t seem to support this claim.

Any and all input on this would be GREATLY appreciated as this silly problem has become a major roadblock to production for me. Apologies if this is a stupid question, but I’m very new to UE4 and could really use some assistance here. Thanks again.

There is probably more than one way to do this but here is what I’d do.

First you need to figure out where the player has clicked. For that, I’d look at converting from mouse to world space.


Then you need to get the pawn to move there. For that I’d use a AI move to, by possessing a pawn from an AI controller. Note that for this to work you will need a nav mesh. Have a look at this tutorial by Tesla.

you have the navmesh working?

Thank you, but therein lies the issue. I’m able to translate the taps/clicks to world space just fine, have a nav mesh in place, have controller set up to handle the touch inputs, but no movement. Can see everything trigger in BP, just no movement from the character. Right now, I’m wondering if I should set up an axis event on the player, call it from the controller, and set the tap up to spawn a trigger that kills the axis on overlap.

Nav mesh is green in the area I want to move in.

It is. I have my character spawn within the navigable area on begin play.

And it needs to be ‘green’ as well in the area your character is currently in.

When you press P in the editor, can you see the navmesh spreading across the level (could you take a screenshot?)

ok, how about instead of spawning the character, it’s manually placed?

Indeed. I really only need movement along X, as this is meant to be a 2D sidescroller. Hence the narrowness. Reviewing the BPs again now.

That was why I went to spawning, no difference.

Thanks to some guidance from and a few other (equally amazing) forum members, I was finally able to implement a very simple touch to move interface that allows the player to touch a destination location and have the player character walk over to it. I’d like to reiterate that this is strictly intended for a 2D sidescroller type game and likely will require fine tuning to do what anyone else may want it to do, but I’ve attached the relevant segment of my character blueprint in hopes this’ll save others some aggravation. Lastly, I’d like to point out that I’m not certain this will work if the character is meant to walk atop sprite objects (I’ve had a lot of issues using them in the nav system), but it seems to work pretty cleanly when using a static mesh for the floor.

I’d welcome any information anyone may have on how to adapt this to work for sprite objects (IE, an invisible blocking volume around the sprite for navmesh purposes maybe?), but otherwise… YAY!