Cannot move PaperCharacter BP in Z axis (Add Movement Input node)

Hi there!

I’m just starting up a new project where I want to create a character in a top-down 2D environment that can move in X and Z axises (my level is set up so that Y is towards camera). I am using PaperCharacter as a base for my main character.

I’m probably missing something very elemental here, but I can’t get my character to move in Z axis (up/down) using blueprint. Below is blueprint I use:

I have tried several different combinations and so far, only X axis work, meaning that my character can move from right to left but not up/down. I have tried using Y axis instead as well as removing all of other nodes (they are there for future animations) but no luck. Since PaperCharacter base is meant to be used for sidescrollers, I have set gravity in blueprint to zero as well as tweaked air friction to make character stop when no button is pressed.

I have watched tutorials for 2D sidescroller movement as well as searched AnswerHub for similar problems but have come up empty. Is there a setting that is freezing my character’s movement that I’m not aware of?

I have tried debugging blueprint and I can see nodes firing off into “Add Movement Input” nodes.
I have also double checked my input mappings.

Any help is greatly apprechiated!

//

Hey Mahkul,

In your Character Blueprint, go to Defaults tab and search for Planar Movement section. Make sure Y value for Plane Constraint Normal is set to 1 and all other values are 0, and Constrain to Plane is enabled. This will make sure character can only move along X - Z plane (hover over Planar Constraint Normal option to see an explanation).

Then search for “gravity”. Three options should appear: Enable Gravity for Sprite and Capsule Component, and Gravity Scale for Character Movement component. Disable all of these and set Gravity Scale to 0.

Let me know if you still see this problem after adjusting those settings and we’ll dig a little deeper. Hope this helps!

Hi and thank your for your answer!

I corrected settings you mentioned, but I still can’t move in Z axis. Are there any other settings I should be aware of, or might have missed while setting up my project?

Oh, yes, one last thing: in your Character Movement defaults, switch Default Land Movement Mode to Flying. As is, Character Movement component assumes left and right for walking.

1 Like

Awesome, that solved it! Thanks!

Hi this worked for me too, but I need to get back to normal because idea is to implement getting inside and outside water. So I set it back to walking but it continues like it was flying. Any idea?

Hey ,

You can reset each of these settings during runtime. So to switch back to normal movement, set your Gravity Scale back to normal, Enable Gravity for both Capsule Component and Sprite, and set Default Land Movement Mode back to Walking. In it’s own function, it would look like this:

Hope that helps!

1 Like

I found an easier way to have pawn (2d Sidescroller) move across z axis. First, in planar movement option of Character Movement (inherited), Plane Constraint Axis Setting needs to be set to “Use Global Physics Setting” . However, as shown in screenshot, Y axis needs to have a 1.0 value not Z axis. For some reason, having Z axis at a value of 1.0 will not have character move at all.