Controlling 2 Pawns using a single input device?

Hi all,

I’ve been trying to build a very simple setup, such that I can move 2 pawns using 1 xbox one controller. I have sifted through several tutorials on the subject and have come to the stage where I have both actors spawned in (the second via the blueprint of the first), and set up movement inputs for both (moveForward, moveForward2, moveRight and moveRight2). However, when the game is run, both pawns appear, yet only the original can be controlled.

I’ve tried a few different things such as relocating the movement code for the second pawn to its own PlayController, but this introduced more issues.
My blueprints for my PlayerController are attached.

Thanks for any advice you can provide!

Have you tried making custom events on the second character and calling them from the first character when the input is received?

I HAVE to know if I can get this working so I’m going to go try lol.

I hadn’t actually considered that! I’ll give it a go, thanks! :stuck_out_tongue:

Add Movement Input seems to only function when possessing the pawn. I even tied it to even tick and it did nothing until I possessed it.

I got it to work with set actor location though


Yeah my custom events didn’t do the trick. I’m sure there must be a logical way to do this…

That’s a novel approach! I’m guessing the animations wouldn’t function correctly with this implementation though. Unless they were explicitly handled frame-by-frame

Could you possibly let me know if I’ve made a mistake calling the custom events? Thanks for all your help :slight_smile:

Fixed my mistake with the event calls, and I can confirm despite the events being called upon the desired ‘MyPlayerController2’, the movement does not occur :confused:

I think you will have better luck putting the code in a custom ai controller and assigning that to the second pawn.

I agree at this point.

Thanks for your help! The AI controller works like a charm! :slight_smile: