How to assign a different player controller on my camera actor in the level bp?

Anyone know? Thanks

Hey @usa423,

Are you talking about the camera following a different player or something else? Can you go into more detail about exactly what you are trying to do?

1 Like

Well I tend to use separate camera actor blueprints dragged into the world for the “camera” view or camera work of different game types. Beat Em Ups, SideScrollers, ShipScrollers, etc etc. In doing this the first thing I have to do is go into the level bp of whatever and “SetViewTargetWithBlend” which of course needs a reference to the camera actor dragged into the world as the new view target. Then it also needs a “get player controller”. I have ran into trouble here before. Because it is default 00 as the player index. I never thought too much about this when I started doing the camera actor thing. What this means is it is essentially setting this as the same player controller as the first player. I don’t like this, I would rather it was set to index 10 or something far away from the players. So if I set that get player controller node to index 00 it usually ends up not working and even throwing out errors to the effect of “not a valid player controller.”

Where do you set that and how? I want this camera actor on a player controller far away from players so that it can’t interfere with them or them with it.

Thanks for the help Quetzal.

bump bump

Game Mode only supports a single player controller class.

Player index is assigned upon the creation of the controller in Game mode. First join gets 0, then 1, then 2 etc.

Use Get Controller, then cast to the player controller class.

2 Likes

Hey Rev thx for trying to help me out on this. Can a player controller contain more than one gamepad? If it can I would not need several other than one for the camera actor and one for the gamepads.

I get that Windows and also UE assign them in the order they were plugged in. But what do I need to do here in the gamemode? I just want a player controller just for the Camera Actor when I assign it in the level blueprint. I have created a player controller just for the camera actor. I’m also confused with how you said to assign the player index from what I spoke to you the other day. Please expand on this if u can. Specifically what exactly to do in this case in the gamemode.