Right Direction of Player Controlled Pawn Movement Stops Working.

Alright, I’ll try to be as comprehensive as possible, since this is one that the instructor I’m learning UE5 from even got stumped on.

I’m making an Atari Breakout style game, Y’know, Brickbreakers or whatever.

In this game, I have the Paddle as a pawn controlled by the player, with on the Main Menu, being able to swap between keyboard inputs (A/D or Left/Right local offset) and Mouse inputs (Mouse Location to world space) IMGs of keyboard and mouse controls:

(in the enhanced input action, its getting the movement keys, A and Left are modified with Negate)


Then in the main menu, it sets mouse move to true if the option is selected in the dropdown menu as shown here:

and this all works perfectly, no real errors to speak of, the problem is when I try to swap specifically to the keyboard inputs from the mouse input in the middle of a game, it disables specifically the right directions movement, as if it’s being zeroed out somewhere, I have that print string before the offset, and it properly displays -20 when pressing left, and 20 when pressing right, like it’s supposed to, but the position of the paddle only changes to go left. The “moving” string is printing as well, so the block is being given proper data, and is actually being run.

Swapping back to mouse inputs works perfectly again, but swapping to keyboard, still the same bug. In the main menu, selecting mouse, playing through a game, going back to the menu, selecting keyboard, it plays just fine, both movement types work exactly as they should, but specifically ingame, swapping from mouse to keyboard, breaks the right direction in some way. Oh and there’s another thing, if the D and Right buttons are changed to also be negate, suddenly they work! just in the wrong direction.

Honestly my brain hurts, I’ve been trying to fix this for a couple hours straight now, and I still don’t even know which BP is actually broken, or what could possibly cause such a specific issue?? So yeah try not to blame me if I missed listing something.

So yeah, any help is welcome, I’m mostly out of ideas here, though I am going to sleep in a few hours, so I probably wont be able to respond until tomorrow.

My best bet here is Sweep. Break that struct and see if you’re getting a blocking hit. Also, you sure you’re not mixing Y & Z. Hard to imagine how the axis are set up; not only that but there’s also World vs Local mix up. That sure must complicate things. Is there any particular reason for this since we’re:

making an Atari Breakout style

Unless you’ve incorporated a Twist, ofc!


Out of sheer curiosity, was this bit:

Recommended by “the instructor I’m learning UE5 from”?

1 Like

Okay, took me a minute, but thank you for the reply, I did figure it out, and yeah, it had to do with the sweep.

Essentially, the mouse move control, set the z into the ground, where the I forgot to enable sweep, meaning mouse movement worked fine, but then swapping back to the keyboard inputs, sweep was enabled, and Unreal saw it as a wall to block movement of the paddle.

Still though, don’t know why it still let me move left, quite strange.

Thanks again though, you really are fast.