How to create a fixed camera that follows player

Hi, I am creating a third person game which involves two playable character. I am currently having a problem with making the camera fixed but still follow the player.
So when the game starts the camera is positioned behind and a little to the right of the player and when the player turns left, right or back the camera is still fixed in the same position.
However if I swap to a different character the camera changes its angle depending on what way the character is facing when swapping over.
I basically want the camera to stay in the first position of when the game starts. Please help me!

This is the position the camera starts in,

This is the position the camera changes to when I swap characters because of the way the character is facing.

1 Like

just a thought… if you just need a fixed rotation at all times, you might find it easier and more performance efficient to use one world camera instead of two Character-based camera component.

if I understand what you are looking for, I’d set up a WorldCamera BP (with Spring Arm to give you the offset). Initially (while prototyping) in it’s BP on Tick, I’d use Get Actor Location (player) and Set Actor Location (self)

Thank you for the help, I added a new camera to the world but am struggling with the blueprint event tick, it does not allow me to use get actor location

… the quick-but-less-efficient-way-that-is good-enough-for-prototyping… use Get Player Pawn and plug it into the actor reference in Get Actor Location

(getting references between actors takes a bit of getting used to… definitely worth spending a couple of hours studying… then you’ll know how to do it the efficient way) :slight_smile:

I created a camera blueprint and added the camera to the world I have no idea how to add the blueprints together

  • attach the blue e (actor reference) in Get Player Pawn to the blue circle in Get Actor Location
  • attach the yellow pin (vector) to Set Actor Location…
  • attach white wire Tick to white wire in Set Actor Location

*** yes, it seems utterly incomprehensible at first… with a bit of study you’ll get very familiar with it

I have done that, what do I do next?

  • remember to attach white wire Tick to white wire in Set Actor Location

also, drag your camera component on top of the spring arm component…

set the spring arm length to your taste…

Ok I have done that, However the spring arm could only go inside the camera component. So I made a new Actor BP and added a camera so I could put the camera inside the spring arm, would that still work?

it looks right… the spring arm is now a parent of the camera:

In your custom camera BP, use Begin Play and Set View Target with Blend to set this actor as the active camera

-set the spring arm length
-put the camera BP into your level (anywhere is ok, it’s BP will set its world location)

I have begin play but I cannot find set view Target

draw a white wire from Begin Play… type Set View Target with Blend (untick context sensitive)

Only these options appear

yes, do you see the tick box “Context Sensitive” on the right top of the dropdown box? Untick this, and you’ll get more choices

Sorry I did not see that, I have added the view target and put the camera into the world

Ok, try to press play… see what happens… I bet the rotation will be strange… but it is fixable

I think I did the blueprint wrong :frowning:

target and new view target need to have a connection to work correctly.

Almost there… from “Target” pull out a wire and type in Get Player Controller

Ok done that