Orbiting the camera around the player, matrix style

Hi guys/ettes, the title probably says it all.
I’m making a fun litle function in my game where the player elevates and the camera is supposed to orbit around him while a button is pressed down. Now all the activation part of it is ok, so is the elevating, I just need help with orbiting the camera. I can get my camera to rotate, but it wont orbit around the player, it just rotates around it’s own axis.
I’m guessing I need to point it towards the player, but I cant seem to wrap my head around how to do this.
All and any help is greatly appreciated:D
PS, all of this is done in blueprints

For the basic setup I would suggest attaching your camera to a “Spring Arm” component it’ll make sure the camera doesn’t clip into objects and makes it very easy to rotate it around a fixed point.

76682-setup.png

To rotate the camera around the player you could try something like this

note that you don’t actually rotate the camera but the spring arm component that the camera is attached to.
The BP above uses two variables

bool AnimatingCamera
(used to make sure the animation cannot start over while it is going
and also to block additional camera movement, you could also call “Disable Input” and use a “DoOnce” node)

Rotator StartRotation
(the camera rotation at the beginning of the animation)

good luck

First of all, thanks for the quick reply.
I allready had my camera attached to a springarm, just forgot to mention that in the original post.
Anyhow, I’ve ran into some issues. I have actually tried a similar sollution myself, and as with my own attempt, I cannot get this to work. The issue seems to be with the spring arm(cameraboom) component, it just does not want to cooperate.
If I change target in the set relative rotation piece, I get a rotation result, but when I put the springarm there, nothing happens. Any suggestions?

Make sure that your “New Track 0” is animating from 0.0 → 1.0 in the desired timeframe, also make sure that you do not modify the “Camera Boom” rotation anywhere else while the animation is running,

Other than that I don’t see any issues with this BP, if it still doesn’t work for you maybe you could upload a demo project file and I’ll take a look

Btw: instead of using a “Make Rotator” node you can just right click the unconnected “A” pin of “Combine Rotators” and choose “Split struct pin” :wink:

Thanks again mate, I figured it out now. I was not able to use the rotation option for the boom, but the controller yaw input worked out just fine. I’m playing around in an old project I made, so apparently I have set that preset allready.
I’ll link my working blueprint for it as well as my final little project, with elevation and slow motion.
Thanks for the help!:smiley: