How can I animate the camera in a perfect circular rotation around a fixed position?

I have an object at a fixed position in 3D space. I would like the camera to circle around it while facing it. I want to path of the camera to be circular in 2D, meaning that it does not move up or down.

I need this to be pretty accurate. I don't want to manually set a keyframe every frame for position and rotation. I would like to do this maybe with an expression, not with manual keyframing. I am not sure how to go about this but I think it is going to involve Python as well as some trigonometry.

• No keyframes on the camera or no keyframes at all? – wchargin Oct 23 '13 at 0:55
• The requirement of not using a keyframe, is strange (and unnecessary I think). Rather then add odd limitations to your questions - can you give more details about what your looking for? - or just state why you can't use keyframes is fine too. – ideasman42 Oct 23 '13 at 4:46
• I meant no manual keyframes. A start and end key is fine but not for every frame. – Vader Oct 23 '13 at 12:46

Yeah, you could...

You could do this with trigonometry. You'd need three drivers: X Location, Y Location, and Z Rotation.

If you want to drive it based on, e.g., the frame, you could pick some constant T for the period (the number of frames for a full circle) and r for the radius, to get:

• X Location: r * cos(frame / T * (2 * pi))
• Y Location: r * sin(frame / T * (2 * pi))
• Z Rotation: atan2(y, x) + pi/2
• Create a variable y with settings Transform Channel, Camera, Y Location.
• Create a variable x with settings Transform Channel, Camera, X Location.

...however, this is downright silly.

There is no reason you would really want to do this. Here are a couple problems:

• There's no need to be dipping into Python and drivers when all you want to do is a simple orbit.
• It makes things more complicated and more difficult to maintain. If you want to change the radius, for example, you have to change it in two locations. Same for the period.
• You have to have a trusted blendfile. Since Blender 2.68 you have to load a blendfile as "trusted" to use any Python (as you should!).

Better way to do this:

Use an empty, rotation, and a constraint. Create an empty and parent it to the object you want the camera to follow. Then, parent the camera to the empty. All you need to do now is insert keyframes on the Z rotation of the empty to rotate the camera around. To ensure that the camera faces it, add a Track To constraint.

How and why does this work?

When you rotate the empty, it also rotates all its children about the empty. This is exactly what you want — an orbit. The camera will turn, as well, but the Track To constraint makes sure it's in sync with the object. Otherwise, it could be turning at the right speed but always facing out, or always to the right, etc.

Benefits of this solution

• If you animate the object that the empty is parented to, the camera will continue moving correctly.
• This is really easy to do and takes about 30 seconds.
• If you work on a team, people will know exactly what you're trying to do.
• You can also animate the camera if you want (move it up or down, in or out, etc.) and the tracking will still work.

Here's what it looks like:

• well if its so silly, what is the proper way of doing it? – Vader Oct 23 '13 at 1:07
• @Jebediah see my edit. – wchargin Oct 23 '13 at 1:10
• will the path be circular though? – Vader Oct 23 '13 at 1:11
• @Jebediah yes, it will. – wchargin Oct 23 '13 at 1:14
• @Jebediah it's not; that's just me manually rotating with my mouse (as you can see by the rotation cursor). If you inserted keyframes on the Z-rotation of the empty instead you would get constant (or linear, or Bézier, or whatever you want; it's a normal keyframe now) velocity. – wchargin Oct 23 '13 at 1:41

Another option would be to use a Curve Circle. Set the center point of the circle to the center of the object you want to orbit around. Parent the camera to the Curve Circle using the Folow Path option. This gives you a perfect, scalable circle but also allows you alter the shape of the orbit if you want by manipulating the points on the circle.

• A good addition to this answer would be some screen grabs to show setup of constraint as setting the Up axis can be confusing – 3pointedit Oct 13 '16 at 11:02
• You can check how to use it there : youtube.com/watch?v=SqOso5jgYa4 – Ivan Gabriele Dec 11 '16 at 17:29