I am developing a Dynamic Camera System for a game and I am having an issue with the camera rotation affecting the player movement direction and not aligning like you’d think or hope it would. I have attached a YouTube video link to show what I am talking about. Help would be appreciated!
It basically looks ok, if a little rigid ( spring arm would help, or settings of it ).
What’s the BP?
When referring to what is the BP? Are you meaning pics of my BP?
If you look at the arrow in front of the character, that is the forward movement direction. I want it to basically use the camera forward direction, I think, instead. If I walk back and forth between the camera triggers the movement gets really weird. I’ve tried constraining movement to a plane, orient rotation to movement on / off and use controller yaw on / off, neither of which achieve what I am after. There is a spring arm on the BP but no where is it getting attached to the player (I thought this a little strange to, but it seems to work?).
The problem will be in your camera control blueprint. People aren’t going to be able to deduce the problem by looking at the vid.
Ok, some things I notice, not saying it will be any use, bit tired now, but…
I can see your camera control is already good from the vid, but I’m not sure it’s a good idea to change the player controller rotation in the camera follow. I mean, you’re just trying to follow the player, not affect it’s movement.
Function Track player rotation refers to the camera, of course, but Function Track player movement refers to the camera and itself. Is that deliberate?
The event graph is too small to read, sorry.
Yes. When I use actor rotation and actor location inside of rotate camera, the initial set values for the loc and rot of the camera get interped strangely. The start camera pans to the sky…
If I set the track player movement actor loc node to a camera world loc node it skyrockets the camera into the sky. Very strange…
If I don’t set the control rotation inside the track movement, the forward x vector or forward direction of the player gets set to a rather strange angle and the w key is no longer up or forward, it’s a diagonal shift.
I don’t think you’re going to solve it while you’re still turning the character from inside the camera tracking BP, it’s no wonder you’re getting weirdness.
Also that 2nd GetActorLocation is the location of the BP, not the camera, it may not be good to mix them, especially if the camera is offset inside the BP.
What’s the overall concept? You want to keep the camera in a certain plane above the player, but behind the player when close?
PS: It’s good to quote otheriwise I don’t get a notification.
Where and how would you suggest I handle it then? Overall concept is a camera system that can swap angles and perspectives similar to what Nier Automata (if you’ve played it) did for their cameras.
Well, like I say, don’t touch the player, just move the camera around them.
You can either have a totally separate camera actor following them around, or just keep adjusting the spring arm on the third person character.
It will be on tick, and the bare minimum would be using FindLookAtRotation. At least that way you always know the camera will be looking right at the player.
It’s probably a good idea to always keep it behind the player, because it can be confusing to control when you keep seeing yourself at different angles. Although you could do this if you want, Resident Evil style.
Pan out ( = lengthen spring arm ) when they start moving and more close up when they stop. That could also be in the tick stream, that’s pretty easy. This is often coupled with a bit of FOV adjustment.
The only other thing is getting right back when obsticles are in the way, that’s the tricky bit. The spring arm handles a lot of it for you, but you could manipulate it with line trace and possibly also sphere trace for objects.
A totally different way of doing it is by having camera control volumes. It’s not a UE thing ( I don’t think ), by basically you make a BP actor that knows when the player is around ( because of overlap probably ), and switches the camera to it’s own camera. You place them all over the level. That way, you know you’re going to get a nice long shot when the player is in a certain area etc.
Of course it’s also possible to mix both approaches.
I’m going for more of along the second way. Having control volumes for the cameras and leave the players camera alone, intact. My understanding was using the Blend View Target Node, essentially deactivates the first camera and activates the target camera. Leaving the players camera standalone, I used a Actor BP with a camera as a “new” camera for the player. I have a variable to detect if the actor is meant to go to the camera or back to the player original camera. I never mess with the players camera inside of the BP. I am creating a new level with various angles of the camera using different functions to test where the limitation is.
Nice, I think it will look quite cool…
Ok, I created a new level, video provided, showing the camera system at work. It could use some improvements but it’s mostly functional. I also provided a small video showing Control Rotation not being set and then Control Rotation being set in the track movement function. Another reason I do this is to not allow mouse or camera rotate input to be used. I could also use a Ignore Look Input node as well…Curious if you could provided any insight on how to set up a rail camera / spline follow camera? I ask this because at the end of the level video when I walk up the spiral staircase I’d like to rotate around the stair case and keep a side-scroll view of the character instead of a top down view.
Control Rotation Showcase:
Well, that’s looking pretty good, nice.
I answered a question recently about following a ball rolling down spiral stairs:
It’s the same concept for following a character up them.
Either that, or you have to draw a spline and move the camera along the spline, always looking at the center.
I’ll take a look at it and see what I can come up with. I appreciate the reply. Another thing, what functionality would you suggest for the cameras to make it feel…‘smoother’ (better quality), for lack of a better word. The only other thing I planned on doing was a rotation limiter for the camera. Sorry for so many questions lol
Ironically, to make the transitions less noticable, I’d go for a direct cut, just like in the movies. Zero delay.