Control second character in FirstPerson mode

Hello there!

So I have a level using the FirstPerson template and I created a character that I need to control via inputs. It’s for a Digital Puppet project. I don’t need the character to walk or jump, just to respond to a series of commands while I move the camera around him.

For that, I created an animation montage and an input action mapped to the numpad 1. After some research, I found that I needed to create a second controller to control the character in the level. In the blueprint, I created the following nodes:

Next, in the character blueprint, which is based off the ThirdPersonCharacter one, I simply modified the controller from the default one to the one I created and then created the nodes to play the montage:

But when I hit play, the character does nothing. I tried to troubleshoot input action by triggering a print screen, but looks like the game isn’t listening to my command. Any ideas of what I’m doing wrong?

You will need to connect a get player controller as the set variable will be null since no input is added to the pin.

image

You might already noticed that the connection from the output of the spawn actor node to the MyController variable is missing. Also check if the casting to your custom controller is successfull.

Would it be something like this? @Arodi007 I’m fairly new in using blueprints, apologies in advance :cry: The character isn’t moving yet.

@OrbitalZones I connected them but still no luck.

Well if it just to control the character directly, you can placed your character bp on the level map.

Then from your character bp, in it detail panel(right side), select Auto Possess = Player 0.

This way when you hit Play, you will control the character without manually spawning him + possess.

@Arodi007 This actually worked! But now my camera isn’t moving. Should I just create another camera and use the custom controller?

1 Like

You will need to setup the camera enhanced input keys and camera component.

Checkout the template first person of unreal and copy paste their main character setup for camera.

Yeah, no, I don’t know what I’m doing. Isn’t there a way to assign which player controller controls what? I just want my character to respond to MyPlayerController and the camera to BP_FirstPersonPlayer.

So far I’ve tried:

  • Create an especific Mapping Context for my character
  • Create a second camara actor, but the problem it’s the same, I can’t get it to move.

Something that hasn’t ocurred to me is to plug in a second controller, but that shouldn’t be an issue, right?

so the game principle is to have 2 players local(non split screen) where one control the character movement and the other the camera view ?

Something that hasn’t ocurred to me is to plug in a second controller, but that shouldn’t be an issue, right?

yup will need the Create Player (if you are making a coop game) and set the camera bp as player 1(in the possess detail panel), and some code that will attach the camera bp to the character bp.
image

Uhh, let me give this a try and see what happens. Thank you @Arodi007

1 Like