how do i stop left and right movement when a key is pressed down

i am making a 3d fist person fast paced game and there is a part where ctrl is slide and I’m trying to stop the player from pressing wasd movement please help

Hey @DrRibsticks!

Even though it might not seem too clean, the best way to achieve your goal is to have a Branch node after your Input Action for movement, right before the Add Movement Input node, and bind a bool type variable to it’s Condition pin. Then set our variable to False when Ctrl is pressed and back to True when let go. (Assuming its default value is True, but if you trigger the movement after the branch’s False pin, then vice versa)

Hope this helps! :innocent:

One thing that comes to mind, though I’m sure it’d take some toggling elsewhere, is the “launch” function. Thoughts?

Hey @doctorpepperdan!

Is what you have in mind constantly adding a launch vector on the opposite direction of the movement vector? No, I don’t think that’d work :confused:

No my idea was launching the character in the direction of movement on input event. But I also thought this would require setting and resetting of the movement component drag or acceleration values. Was just an idea I figured you’d have better insight than I do