9
$\begingroup$

I have a camera System that is supposed to look at the empty in my scene. It should only move, not rotate. It should rotate in two parts. One, the actual sensor body and the other, mount plate. Rotating these two parts the camera should be pointing straight at the object. I assume this should be done using constraints.

enter image description here

blend file

$\endgroup$
  • $\begingroup$ Have you tried "Track to" constraint? $\endgroup$ – p2or Apr 18 '15 at 15:04
  • $\begingroup$ Yes, but it just flips my mesh the result looks totally weird. $\endgroup$ – Vader Apr 18 '15 at 15:06
  • $\begingroup$ You do realize that in five or six months that blend file will be a dud link? $\endgroup$ – X-27 wants to Reinstate Monica Apr 18 '15 at 15:07
  • $\begingroup$ It's not easy to setup sometimes, but this might a help: cgcookie.com/blender/2011/09/19/… - here is a camera cube track to: pasteall.org/blend/35649 as simple example. $\endgroup$ – p2or Apr 18 '15 at 15:09
12
$\begingroup$

This is exactly what the Locked Track constraint is for.

First you need to set up your camera objects. Parent the lens to the mount. Then the mount to the base. This hierarchy will enable you to get the motion you are looking for in all the pieces.

Add a Locked Track constraint to the lens object. Notice the axis the lens is pointing on (you may want to turn on axis display in the object tab of the properties window) in my example it is looking down the Y axis. So it is tracking along the Y, and rotation is locked to only the X axis.

locked track constraint settings on the camera scene with camera objects and tracking empty

Add another Locked Track constraint, this time to the mount object. It has similar settings, except that the rotation is locked to only the Z axis.

Blend File

animated gif


As a bonus step add a Limit Rotation constraint to the lens object, to stop it from rotating through the base. If your camera is looking along the same axis as mine, then you only need to limit the X axis.

$\endgroup$
  • 1
    $\begingroup$ Good solution, worked well. $\endgroup$ – Vader Apr 18 '15 at 16:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.