Dynamically change inputs based on camera?

Hi all,

I’m working on the control system for a 2D/3D hybrid game, where you can switch between a 2D side-scroller camera and a 3rd person shooter. That’s working fine, and I’ve disabled mouse-look input in the 2D view so I don’t run off the map. The issue comes with movement of the Player. In the 3D view I’m using WASD movement, but in the side-scroller view I’d like to have A run backwards (instead of S) and D run forwards (instead of W). My hacky workaround idea right now is requiring a GamePad, and using the D-Pad for the 2D view and the Joysticks for the 3D view. Is there a way to make this work with a keyboard though? In Unity I’d just wrap the movement keys in two lists to switch between (in C#) but I’m not sure if there is a Blueprint equivalent to doing this with Unreal’s Inputs. I wasn’t able to find anyone doing this exact thing in searching the forum; anybody have a thought/suggestion?

Why not just re-wire the A / D when using 2D -vs- 3D? Have a branch that checks which mode you are in and rewire the controls accordingly. You’ve already disabled the mouse-look on 2D, you can do much more than just that. Set a boolean that holds whether it is in 2D more or not. Check that boolean right after a control input, branch accordingly.

I figured out something late last night and it seemed to work, where I’m doing a branch check like you suggest but changing the Vector I use. So in 3D I branch into the Forward vector for forward movement (The W key), and in 2D I branch into the Right vector for forward movement (The D key). When you say to “re-wire” is that essentially it, or is there another approach? I apologize for being fairly new at this :slight_smile:

You got it, right on the money, affirmative, yes.