How can I control 2 pawns with 1 controller?
I'm trying to control 2 pawns with each thumbstick on my 360 gamepad. I've managed to setup the inputs correctly when the pawns are in the scene by themselves. However, when I spawn the first one via the player spawn and spawn the other pawn through the level blueprint I can't control the one I spawn through the level blueprint. It is stuck in the air and won't listen to any input.
I've checked the answers from similar questions but haven't been able to make anything work. I'm pretty new to UE4 so there might be something small I miss, so I'm glad to get as much help as possible.
You need to make sure that the second pawn you spawn has a Player Controller possessing it, or it will not respond to input using the CharacterMovement component. Since you are attempting to use two pawns with the same gamepad, you'll need to give the second pawn its own Controller; Player Controllers can only possess one pawn at a time. I was able to set this up by spawning a second Controller, then spawning the second pawn, and possessing the second pawn with the second controller, like this:
I have this set in the main Controller I'm using for the first pawn rather than the Level Blueprint, because it's generally cleaner to avoid using the Level Blueprint for things that do not pertain specifically to that level, but this should work in the Level BP if that's how you prefer to do it. Note that this is a very basic setup and can be elaborated on depending on your goals.
Hope this helps! Let me know if you have any questions.
answered Aug 23 '14 at 07:59 PM
how to manage two pawns without a controller
answered Feb 10 '16 at 09:04 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here