Camera look at center while rotating around

I’m attempting to get a camera component to rotate around an object, and keep its center of focus pointed at the object. The camera can also accept mouse input to look around.

I have included a visual representation of what I am trying to accomplish, which is all completed, except for my camera rotation issue.

If you need a better explanation, imaging your taking photos out of moving plane. Plane travels along orbit path, you’re facing the object, but you can look around.

Blueprint and Function:

Any tips appreciated!

Have you looked at SpringArm Component? Orbiting camera movement should be possible with it easily, just rotate the SpringArm Component with attached Camera.
If you want to also to look around feature while orbiting, you can rotate CameraComponent itself.

Hope it helps :slight_smile:

I’ve thought about giving up and just using a springArm component, but I’d prefer to solve the problem. And I can’t just call SetActorRotation on the camera component because of the “camera component object reference is not compatible with actor object reference”

You should be able to parent the camera to an empty actor object and rotate that instead. Also enable look at tracking on the camera and set the actor to track to the dummy.

Ok, let’s see,
Why is using SpringArmComponent is not the prefered solution to this problem? As far as I understand it’s one of the direct purposes of it. Or do you have some specific feature that requires to not use it?

Second, you getting wrong type of either reference or node. If you using CameraComponent (not Actor) then you can’t use SetActorRotation, you should be using SetRelativeRotation instead. Just in case you want to use world space rotation to drive your camera, just do TransformRotation to switch space to the owning actor of camera (Or to space of your SpringArm in this case)

I can, however once I do that I’m unable to move the camera with the mouse.