Making a semi fixed câmera

I’m trying to make a game camera like the persona 4 game, when you’re walking around the city there’s a fixed camera that follows the player, the camera is both looking to the player and following along in a fixed position, I’m very new to game development so I don’t know how to make something like that , I tried following a couple of tutorials but I could only find resident evil fixed cameras, but what I’m trying to do is a camera that is both looking to the player and following a designated path keeping the player in the center while from far away, any help is welcome

Adding a “spring arm” component to your character, offsetting/rotating it to the placement you want, and attaching a camera to that component, should do the trick.

See Using Spring Arms | Tutorial for a more detailed explanation if just adding the components doesn’t automatically work.

If I’d misunderstood the requirements feel free to clarify.

1 Like

Sorry but what I’m trying to do is a fixed camera to be used throughout the game where is placed in a fixed position but it moves along the character centralizing it like rune factory frontier or persona 4 when exploring the city

Ah you want a static camera looking at the player, try something like this (Camera is a camera component inside any actor placed in the level, this Tick should be in that actor).

Sorry but what I’m trying to do is implement a function like a path where the camera in a semi fixed position will follow the player in the level from one side to the other
Like this : https://youtu.be/g7vnKY9d0sc?si=ONVY8hLP65ztCFuU

Ok, so a moving camera, but not attached to the player, but still following the player and looking towards the player. For the rotation part you still want my previous reply’s logic (to make the camera look at the player). For the location following part, add a Spline Component to the actor containing the camera and define a path the camera is supposed to follow through the level by placing the actor in the level and editing the spline (see image, I suggest using the generation panel to start with, and then adjust the points as you wish):

Add this logic to the tick as well:


Which will detect the player’s “progress” along the spline, go back a little, and set the camera at that position. Adjust the “-” node to modify the following distance.

Im very new to unreal engine so I don’t know how to add two things to the event tick and the second blueprint for some reason it sends the camera flying until the map stops rendering, the first code works perfectly :face_holding_back_tears: sorry if I’m bothering you

(I’m literally here just to try to answer questions, so I’m obviously not bothered by questions :stuck_out_tongue: )

Assuming (for now) that I didn’t mess up the second logic, did you set up the spline to go through the level (defining a path for the camera)? You should be able to just plug in the output white wire from “Set World Rotation” (first graph) to the “Set World Location” (second graph), which will perform both in sequence (causing the camera to both rotate and move towards the player). But if you just plugged in the second one, that should partly work too (you should get a camera moving as the player is moving, but not rotating).

Can I get some screenshots of your current setup and some more words on how the camera goes “flying until the map stops rendering”? Does it move without the player moving? etc.

The moment i activate the camera through a box collision the camera starts to go away from the character flying away without stop, that only happens when I implement the second blueprint set world location even when activating only the second blueprint the camera is sent flying away
I also make a path with the spline that the camera is suppose to follow
Here’s the blueprint

I used a tutorial to make the box collision

heres the flying camera part

Could you screenshot your spline setup in the level? I just tried this out (same nodes) and the behavior is fine in my case.

(here’s my spline as an example, and my object followed it fine)

1 Like

Thank you so much it worked, I thought I should put the spline inside the camera as a component
But after seeing your example and changing it now the camera follows perfectly
Thank you so much :saluting_face:

1 Like