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.