TrackTo and Limit Rotation

Hi

I want to model a search light that has limited rotation and targets … a target.

I now use an empty for the target and trackTo and LimitRotation constraints on the spot (which is parent to a mesh).

Problem is:
The light will be mounted on a spaceship which moves and rotates freely and so will the target.

I set the LimitRotation to “local space”, so that limits “move along” with the ship.
That works fine, but when I add the TrackTo Constraint, it messes up the limitations.
I figured, thats because of the “up” axis, so i fixed it (somehow…).

But when i turn the hole thing (search light+base+empty), the tracking becomes upside down when the empty crosses over the world axis. So when it’s on the left side of the screen and I move it up, the search light rotates down, whereas on the right side, everything is fine.

Anybody got an idea how to do this?

Edit: I suppose the problem is, that the trackTo Constraint defines an UP axis - which is either world or target - but i can’t use any of those. World would mess up, when i move the ship, target would mess up, when i move the target :frowning:

I think i found a solution!

i made the “target”-empty trackto the base of the light and get it’s “up” axis from it.
then i made the lamp get it’s “up” axis from the target-empty.

so that in the end, the lamp get’s the up axis from it’s base.

i hope this helps anyone else ever facing this problem :slight_smile: