Download

Seperate Camera / Same Gamepad - controller

Hey guys

I’ve run into a snag on a prototype I wanted to build using blueprint.

The idea is that I have a small, playable character and a seperate camera that rotates around a central point. Basically I want to be able to control the camera rotation around a central point, and a moveable player inside the level all from the same gamepad.

Using a top down perspective as a reference you get this.

Red Dot = Pivot Point for Camera

Red Circle = Camera rotation around central point

Blue = Player pawn that can move around the black area completely independent of the controllable camera

Black area = playable area

I tried building a seperate pawn blueprint with a swingarm and camera that I can place on the central point, but I have no idea how to get it to accept controller input.

So to clarify best I can. Camera on right stick, player on left stick. Camera is an independent entity that can rotate around a fixed point, while the character is able to move around the gameworld freely.

Thanks!

Have you watched Epic’s Third Person Blueprint Tutorials yet? They will teach you how to set up inputs from the mouse, keyboard & joypad, then how to set up a camera with a boom.

Once you’ve done that you can use the input values from the Right Analogue stick to rotate the boom and you can multiple the input values by a Max Speed Variable you create to give you analogue control of camera movement.

I did, and I am able to make the camera rotate around the actor just fine. The problem is, I want the camera rotation to be around a completely fixed point that does not change, all while having the player be able to move all over the level and both accept inputs from the same controller.

AHA. I figured it out. I created a blueprint copy of my main character and called it AI. Stripped it’s event graph.

The way I was able to do it was adding this to the level blueprint. I am going to work on it a bit more so I don’t have to copy this to each level.

Event Begin Play - Enable Input - Get Player Controller / Player Index 0

InputAxis - MoveForwardBack(my input axis I setup in the inputs tab) → Add Movement Input - Target the duplicate character blueprint and control world direction. It works great. Now my character movement in the level is completely separate from a controllable camera.

Another option is to add a camera actor to the level, and then set that as the view target at begin play. We are going to add a ‘auto use this camera’ flag to camera actor to make this easier.

I tried this for a bit before coming up with my solution. I was able to get it to switch to this camera… but there was no way for me to get the camera to accept input and become mobile like I wanted it to do… I am a complete newbie so I might have been missing a step.