Weird rotation with Track To constraint?

I’ve got a circle that’s tracking an empty (Which I scaled up to show it doesn’t rotate) and both have a linear animation along the Y axis. Midway through, just for 20 frames, there’s some weird rapid rotation around the z axis happening to the circle and I can’t find anything in the Fcurves to explain it. Can anyone help me understand what’s going on? If it’s a bit technical that’s fine, I’m familiar with the way different matrix transforms are “layered” and maybe this is an opportunity to learn more about it.

I should note that there was more animation after this bit, but I deleted all those keyframes and still the problem persists.


constr.png

Your video isn’t working, but it sounds like gimbal lock to me. Are you using Euler rotation or quaternion?

I’m not sure. How do I check?

If the two objects are perfectly aligned it can cause flipping because the constraint doesn’t know which way is “up”, maybe that’s what’s happening. You’re using Y axis as up, and that’s also the axis along which the objects move, so that seems likely. I would use a different combination of constraint parameters : try checking “target Z” and rotate the empty to compensate for the circle’s change in orientation.

It’s what the track-to constraint does. In order to maintain a particular up axis, this kind of rapid rotation is always going to occur when the constrained object moves close to or over the pole. If you don’t want it to do that, use a damped track constraint instead.

2 Likes

perfectly aligned it can cause flipping

This was the issue (although @bandages’ answer is essentially on the money as well). I just keyframed an offset of my empties a tiny bit toward the side of the pole they would eventually be on. Admittedly this affected the perfectly flat rotation my circles had, but that’s an acceptable compromise.