2D Movement

I doubt I’ll get an answer, because I never do, but what the hell.

I’m trying to add movement to the player character in a 2D game. Up moves up (W), down moves down (S), left moves left (A), right moves right (D). No matter what I try, the character never moves. How would one go about creating movement in this way?

And before you event attempt to link me to some doc or forum thread that won’t actually help me, I’ve already looked around.


For example, this link does not help. I followed everything that doc said exactly and movement still didn’t work. I even created an entirely new project and named everything identically as it was shown in that doc, and movement still didn’t work. And continues to not work.

So, again, how would one go about creating movement in the way specified? Give me entirely completed blueprints, if you have to.

It can be quite difficult finding resources and answers being that the UE4 community doesn’t seem as large as some engines.

Here’s a project file which shows how to do exactly what you need: MyProject9
Original thread: Learning Templates [Blueprint Power] - Programming & Scripting - Unreal Engine Forums

There’s no extra content and it’s well organized so it should be easy to follow. I think it uses the arrow keys.

If you are still having problems let me know. Also, if you have any further questions visit the forums and send me a message. I’ll still a newbie myself but I’ll help you out if I can.

Which part do you still need help with? You can choose which keys are used to move your character by going to the Edit menu, Project Settings, and then Input from the left.

That’s just the learning process. Blueprints(scripting) are easier than programming, but still a very complex tool. Without any programming experience it’s going to be a challenge. I’ve found all of the tutorials by the UE4 staff are very well covered. There are definitely some confusing parts that still go over my head but not everything can be completely explained as tutorials would take twenty times longer.

I googled: “ue4 documentation receive input” and Input | Unreal Engine Documentation was the first result. This page shows you how to setup input as well how to add it to your project. It explains how it works and why. But keep in mind this tutorial seems to be for a 3D world. In reality you don’t need the rotation part just the up down left right.

Start by learning data types: Blueprint Variables | Unreal Engine Documentation

If you don’t understand a data type in full then research it further. Data types are virtually universal in all languages and aspects of programming and by knowing how each data type behaves alone can get you far.

Other data manipulations that aren’t discussed in that link are which you’ll likely need down the road are the XOR function of bools as well SIN and COS. These are all math terms, not strictly related to programming.

Long story short is that you’re in for a lot of learning and a lot of work. Programming a 2D game is definitely the best start for a beginner as it’s much less complex. If you find something that works but don’t know why then break it, and find out what’s breaking, and why it’s breaking, then understand the solution.

If you do find yourself asking questions be EXTREMELY specific. A lot of experienced programmers don’t want to answer vague questions; you have no idea how much easier it is when you’ve already handed us examples, failures, and what not.

Keep in mind UE4 is still implementing the 2D system. It’s viable but still has work to be done. If you can work with it as though it were 3D you may have an easier time finding answers.

2D is just flat objects in 3D space. They can still be manipulated like 3D objects but they are missing a face(side).

I’ll be looking over the linked BP’s, but I suspect it’ll have little bearing on touch-to-move functionality for a side-scroller. That is where I’m hung up. Old thread, but hoping someone will see this and be able to point me in proper direction.

I had the same problem. After hours of searching/trying, I finally had a solution (NOTE I am not a pro in ue4 blueprints).
First of all, go to your project settings → input,

Than open your character blueprint

Now you’re going to do the same thing but than for sideways “walking” (see blueprint below)

Hope this helps.
Sorry for bad english

Thanks! This helped me and I thank you for the great screen shots!

I am new here, Don’t see where posters names are? Anyway thanks whoever you are!

No problem, if you need any help just ask! There a plenty of people here that want to help you!