Rotate Spring arm with character movment

hello! Here is what i am trying to achieve - Rotate spring arm (camera parented to spring arm) relative to character position with enter and exit triggers. In the middle of the level there is a large structure that the player needs to run around.

enter and exit points will be triggers that change camera to the BP Top down character camera

I have tried adding a spline and making camera move across the spline but that didnt work.
Majority of orbiting cameras are in sequencer, but that is not for game play.

Would it be best to approach this from the level blueprint? or from a Actor blueprint with spring arm and camera?

looking for tips and suggestions! Thank you!

Have you tried the LookAtRotation function?

Will return the rotation between the “springArm center” and the character position.

You can then use that rotation to place the camera wherever you want and it will rotate when the character moves.

1 Like

will try this out! thank you!

Hey thank you for the suggestion, it works but

The Spring arm is only doing half of the full rotation, when the character goes around the corner the spring arm just moves backwards. Yes it is tracking the character position correctly, but it is not going full 360 degrees.


as you can see here - at some pint the spring arm stops going a full circle and just stops rotating further
(Attaching example lower, apparently new users cant dd more than one image in a post)
I could take the Z angle and run it through >< nodes ( if more than X degrees add Y to local rotation of spring arm) so it technically could go all 360 degrees. but this seems clanky and I am unable to get Z value after i set world rotation.

Any suggestions appreciated

rotationIssue1
here is an example of the rotation issue i am describing
gif is very crunchy apologies

Why haven’t you put the X and Y coordinates of the SpringArm position in the LookAtRotation function? And the Z coordinate of the pawn?

I think it doesn’t work because you’re not using all the parameters… then you have an incorrect rotation.

Anyway, SpringArm has some options that can change the behavior.

try this too:

UsePawnControlRotation (true or false)
InheritRoll (true or false)

You have to experiment a bit with those options until you get what you want.

If you want to rotate the camera a little → (Yaw*2), use the “Rotate Vector” function.

Remember that you are using vectors in a 3D space… what you do to one coordinate affects the other two… For this reason, it is better to use the functions that the engine gives you (they are transformation matrix operations).

Just in case:

1 Like

thank you! I will try those options!

1 Like

yep lmao that fixed it
I think the reason I had them disconnected is because i was trouble shooting some issues and havent connected them back
Thanks so much!

you are welcome :heart: